I created a Class C with a member variable: someString. And a function: string getString()
In my main() i have:
C object( "hello" );
C* pointer = &object;
cout << pointer->getString() << endl;
The problem is that it's giving me gibberish. I was wondering if i needed to add a template specialization for pointers of Class C, i.e. template <> Class C<void*> or something like that.
Any suggestions are appreciated,
jtax
In my main() i have:
C object( "hello" );
C* pointer = &object;
cout << pointer->getString() << endl;
The problem is that it's giving me gibberish. I was wondering if i needed to add a template specialization for pointers of Class C, i.e. template <> Class C<void*> or something like that.
Any suggestions are appreciated,
jtax