Original Post
Hi
Supose i have a class like this :
class foo
{
AddLine(Char *blab);
};
This class is defined in first.cpp as
foo myfoo;
Now, i would like to use this class in another file in the same project, in second.cpp for example.
myfoo.AddLine("foo again");
so, i declare the variable as external in this second.cpp as
extern myfoo;
The problem now is that when compiling i have this error :
error C2228: left of ''.AddLine'' must have class/struct/union type
Looks like he doens''t recognize the funtions inside the class..
How can i do this ?
thanks,
Bruno