11-05-2011, 05:11 PM
To access the data members or functions of a class with the help of an object, we have two operators: dot operator ( . ) and arrow operator ( -> )
When object is not a pointer, like we made List object as List myList; , we use dot operator to access functions of List class, like myList.add(2);
When object is of type pointer, like Node * currentNode; we use arrow operator to access functions of Node class, like currnetNode->getNext();
When object is not a pointer, like we made List object as List myList; , we use dot operator to access functions of List class, like myList.add(2);
When object is of type pointer, like Node * currentNode; we use arrow operator to access functions of Node class, like currnetNode->getNext();
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
