Re: skip function parameter
What does "doesn't work" mean? A compiler error? If so, paste it.
Re: skip function parameter
my function in .h file:
Code:
bool funz
( twmConfigTerminalItemStruct
* twmConfigTerminalItem ,
QString theIPAddress
= "" ,
QString * stringToReturn
= NULL );
my function in .cpp file:
Code:
bool twmCommunicationObject
::funz ( twmConfigTerminalItemStruct
* twmConfigTerminalItem ,
QString theIPAddress ,
QString * stringToReturn
)
i call it in my Main in this way:
Code:
funz ( twmConfigTerminalItemStruct* twmConfigTerminalItem )
and i get a segmentation fault...
Re: skip function parameter
Perhaps you're missing a sufficient check for null pointer?
Code:
if (stringToReturn != NULL)
{
*stringToReturn = "foo";
}
I'm sorry I'm afraid there's not much we can say about it with that amount of information. Just compile the app in debug mode and run it via gdb whenever you get such crashes you don't understand.
Re: skip function parameter
it doen't work....but i solved it using overloading ;)
thx