• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
This makes no sense
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

This makes no sense


  • Subject: This makes no sense
  • From: "Theodore H. Smith" <email@hidden>
  • Date: Mon, 23 May 2005 14:13:13 +0100

If I define a function like this:

CString operator+(CString me, const char* s)

I get told that the function is multiply defined. (although I can't actually find the other definition, and I didn't write it myself).

However, if I comment out this function, I get told

error: no match for `CString& = std::basic_string<char, std::char_traits<char>, std::allocator<char> >' operator

On the code:

	char* tempr = (char*)randData;
	szbuf = szbuf + tempr; // error on this line


Which is exactly the problem that this operator is supposed to solve.

So, if the operator was already defined, then why wasn't already used????? Xcode is making no sense here. It's contradicting itself.

I suppose I should stick to function syntax, as Xcode can't seem to handle operators.

--
elfdata.com/plugin/ Industrial strength string processing, made easy.

"All things are logical. Putting free-will in the slot for premises in
a logical system, makes all of life both understandable, and free."

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Xcode-users Digest, Vol 2, Issue 215
  • Next by Date: Re: This makes no sense
  • Previous by thread: Re: Xcode-users Digest, Vol 2, Issue 215
  • Next by thread: Re: This makes no sense
  • Index(es):
    • Date
    • Thread