PDA

View Full Version : Invalid return type



Salazaar
5th June 2007, 16:13
Hi. I've got a problem. In C++ GUI Programming with Qt 4 was something like that: constructor is bool, and in one of functions appear return Save() (which was declared as bool) and if I try to do something similar, constructor bool and try to return it, there is error about invalid return type for specyfication

marcel
5th June 2007, 16:29
There is no such thing as constructors returning a value.

Read that book again, probably you missed something.

Regards

Salazaar
5th June 2007, 16:32
No, I didn't miss. I've done simple slot which returns bool function.

marcel
5th June 2007, 18:51
Do you have a private constructor and some kind of static bool function that creates class instances? Or what?

Why don't you post the code?