I'm going crazy, pointer problem .??
I have a * object created as new();
ascii_file * G_w_ascii_out = new ascii_file;
I have a function that receive a pointer to this ascii_file :
My call;
w_comm_parent->w_export(G_w_ascii_out);
I have the error :
error: no matching function for call to 'W_comm::w_export(W_inpout::W_ascii*& )'
candidate is: void W_comm::w_export(W_inpout::W_ascii* )
I don't understand whats happen. I have an identical call at other place, and that compiles right .
Aaaaahhhh!
Re: I'm going crazy, pointer problem .??
Without showing the definition of type ascii_file nobody can understand either, but it seems to be a referencr to W_ascii, whatever that is.
Re: I'm going crazy, pointer problem .??
Exactly, I have even a gut feeling that there is more parameters for "w_export" and the pointer is not a problem at all...
Re: I'm going crazy, pointer problem .??
Can be the problem related to the next :
The class A create an instance of classB, doing forwarding
After I have inside ClassA the next function
Code:
my_classB->write(string file_out, this); ( the my_classB declare is : my_classB(string a_file,ClassA *class_a_parent )
( ClassA *class_a_parent is also using forwarding )
( Both clasess use forwarding to each other )
And inside write method I have
Code:
W_ascii * ascii = new W_ascii;
class_a_parent->a_method_of_class_A(ascii)
Ok, I think class_a_parent->a_method_of_class_A is the guilty of pass W_inpout::W_ascii*& insteadof W_inpout::W_ascii*
It happens with every object I create and want pass to the function, I have the same error *& expected *, &int, expected int ....
(somebody appends & ....)
What do you think ?
Re: I'm going crazy, pointer problem .??
I think there is not enough info to help you. I will repeat what is already posted in this thread - show the actual code, with related types and methods definitions.