
[Hugo Ferreira][Positronic Dreams][Colibri 3D Engine][Entropy HL2 MOD]
[Yann L.][Enginuity] [Penny Arcade] [MSDN][VS RoadMap][Humus][BSPs][UGP][NeHe]
"I say we take off and nuke the entire site from orbit. It''s the only way to be sure."


quote:That''s not the problem. The problem is with implicit conversions, because of ambiguous situations that cause very hard-to-track-down bugs. Like tangentz said, Google the rationalizations for std::string::c_str.
Original post by pentium3id
well, my string class has a char* which starts out as null, and gets asigned/resized as operations are performed onto it...
quote:Well, not really. It does raise the question what happens when you assign a non-numeric string to an integer variable, or when the numeric characters in a string are in the middle.
i also provide some stuff like:
int = mystring;
mystring = int;
mystring = char*;
...is that bad design?
quote:Because a string is not a first class type in C++; a char * is. Also check the operator precedence: the addition is completed first.
btw, why cant i do this:
mystring = "1"+"2"+"3";
I allways get a "cannot add two pointers" on that one...
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more