Problem with class operators.

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

 



Hi All,

I've a problem with class operators. In this case (I try to cut this down)
my class, which holds a string.
I'm working on XCode.

	bool CkString::operator == (char const* string);

	CkString::operator char*();

Now I try :

	b = (ckstring == pchar);

now I get an Error :  

	error : ISO C++ says that these are ambiguous, even the worst
conversation for the first is better than the worst conversation for the
second
	note : candidate 1: bool CkString::operator==(const char*)
	note : candidate 2: operator==(char*, char*) <built-in>

thanks for help,

Kristian

--------------------------------------------
Kristian Kratzenstein
Gettorf

Kristian.Kratzenstein@xxxxxxxxxxx
--------------------------------------------



[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