S
singhal.prateek
Hi,
In a class, I have a static function which returns a particular object
of the class depending on the arguments. Now, if I use this function to
call another method of the class, I get an error. It is like:
printf("%s", getName( getObject(params) ) ); // Works fine!
getObject(params).read(); // Gives read undefined error.
read is a function of the class in consideration here.
Any clues? Is this allowed at all in C++?
Thanks,
Prateek
In a class, I have a static function which returns a particular object
of the class depending on the arguments. Now, if I use this function to
call another method of the class, I get an error. It is like:
printf("%s", getName( getObject(params) ) ); // Works fine!
getObject(params).read(); // Gives read undefined error.
read is a function of the class in consideration here.
Any clues? Is this allowed at all in C++?
Thanks,
Prateek