Problem with binary operation and result code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hallo,

I am trying to compile code like this:

Class object;

If (SUCCESSFUL != object.get_a_value(value) ){
	//error ....
}

 
But g++ doesn?t like this. g++ wants an get_a_value method without a 
return value. 

This code is compliable with a sun complier and I am wondering if some of 
you had a similar problem. There are really a huge amount of these 
statements, so re-writing is not a good idea.  Is there a compiler 
options to make g++ understand such a statement?

This works:

Class object;
ResultCodes res;

res = object.get_a_value(value);

If (SUCCESSFUL != res){
	//error
}

I am using:
g++ 3.0.4. 
RH 7.2 /  2.4.7-10

Thank you very much for your help!!

Leonhard


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux