forked from aaronbloomfield/pdr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTreeNode.cpp.html
More file actions
33 lines (30 loc) · 1.75 KB
/
Copy pathTreeNode.cpp.html
File metadata and controls
33 lines (30 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="GNU source-highlight 3.1.5
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite">
<title>TreeNode.cpp</title>
</head>
<body bgcolor="white">
<pre><tt><i><font color="#9A1900">// Insert your header information here</font></i>
<i><font color="#9A1900">// TreeNode.cpp: Tree Node method implementations</font></i>
<i><font color="#9A1900">// CS 2150: Lab 5</font></i>
<b><font color="#000080">#include</font></b> <font color="#FF0000">"TreeNode.h"</font>
<i><font color="#9A1900">//Default Constructor -left and right are NULL, value '?'</font></i>
TreeNode<font color="#990000">::</font><b><font color="#000000">TreeNode</font></b><font color="#990000">()</font> <font color="#FF0000">{</font>
value<font color="#990000">=</font><font color="#FF0000">"?"</font><font color="#990000">;</font>
left<font color="#990000">=</font>NULL<font color="#990000">;</font>
right<font color="#990000">=</font>NULL<font color="#990000">;</font>
<font color="#FF0000">}</font>
<i><font color="#9A1900">//Constructor - sets value to val</font></i>
TreeNode<font color="#990000">::</font><b><font color="#000000">TreeNode</font></b><font color="#990000">(</font><b><font color="#0000FF">const</font></b> string <font color="#990000">&</font> val<font color="#990000">)</font> <font color="#FF0000">{</font>
value<font color="#990000">=</font>val<font color="#990000">;</font>
left<font color="#990000">=</font>NULL<font color="#990000">;</font>
right<font color="#990000">=</font>NULL<font color="#990000">;</font>
<font color="#FF0000">}</font>
</tt></pre>
</body>
</html>