|
-
February 7th, 2008, 07:45 PM
#5
Re: std::vector mangles a char*
 Originally Posted by MrDoomMaster
I hope you never have to copy a vector of string objects. That's the downside to using std::string most of the time.
Usually vectors are passed by reference, so this should not be a problem. However, if the goal of the program is to actually copy strings, then copying vectors would be part of the design.
In any event, depending on the compiler, returning a vector of strings by value is usually optimized away and the penalty isn't incurred.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|