Something I am very confused about..assuming I had the class and functions found below.
When the printTestData() fnct starts running, will the listObj contain anything in it? or am I suppose to first return and the send the listObj via pass by reference to the printTestData() fnct?
Also...if I am suppose to send the listObj via pass by reference, then why am I declaring it within the class structure? Couldn't I just create it in the createTestList() function and then send it?
thanxCode:class Test { private: SLList<Dictionary> listObj; Dictionary dObj; createTestList (); printTestData(); ..... ..... }; //-------------------------------------------------- void Test::createTestList() { .... while (i++ < something) { .... .... listObj.makeLink(dObj); } } //--------------------------------------------------- void Test::printTestData() { .... .... while (i++ < something) { dObj = listObj.printList(); <--Here cout << dObj.data << endl; } } //--------------------------------------------------- int main () { Test x; x. createTestList(); x.printTestData(); return 0; }