php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
, Node* new node = new Node(9) its mean new node points to Node. The address of new n
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
Node * myNode = new Node(9); [myNode now has value 9]

The first part of the statement that is on the left of the assignment is declaring a variable pointer (myNode) of type Node. On the right of this statement, the new operator is used to create a new Node object as new Node(9). This is one way in C++ to create objects of classes. The name of the class is provided with the new operator that causes the constructor of the class to be called. The constructor of a class has the same name as the class and as this is a function, parameters can also be passed to it. In this case, the constructor of the Node class is called and '9' is passed to it as an int parameter.

.

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  what is the existing node and root node Vuhelper 0 2,255 01-04-2012, 11:09 PM
Last Post: Vuhelper
  how to insert a new node on AVL tree using double rotation? Vuhelper 0 2,787 01-04-2012, 10:31 PM
Last Post: Vuhelper
  reenode* node = new treenode(info); Vuhelper 0 1,894 01-04-2012, 10:18 PM
Last Post: Vuhelper
  how can we delete a node with two childs in binary tree??using its right sub tree Vuhelper 0 2,713 11-05-2011, 05:27 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support