View Single Post
  #33  
Old September 19th, 2006, 05:49 PM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: OT: Stupid c++

And now it isn't even getting past re-sizing the character array.

Why are you using character arrays at all? There is no reason to ever use them over string. Any time you need to pass a char* to a function, just use the .c_str() member on your string (aka: crazy_function(mystring.c_str()).

C++ is stupid.

C++ is neither stupid nor smart. It all depends on how you use it.

Why would the 'new' operator re-assign the same pointers?

I don't understand the question. New doesn't assign any pointers; it creates an object in the dynamic memory space (heap), and returns a pointer to it.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote