in a C++ program, if I want to do this...
"Class1"
{
...
Class2 *node1 = new Class2();
Class2 *node2 = new Class2();
Class2 *node3 = new Class3();
if (node1->method(node2)==node3) {...}
...
}
"Class2"
{
Class2 Class2::method(Class2 node)
{
...
return node;
}
What should the references put in the return type of method?? the argument?? and the last code "return node"??
Such as,
Class2 * Class2::method(Class2 * node)
{
return * node;
}
this is not correct. Would anybody help me to fix this problem?? thank you very very much!



LinkBack URL
About LinkBacks


