Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    570
  • comments
    2427
  • views
    216937

Untitled

Sign in to follow this  
Mushu

65 views

Quote:
Quote:
Original post by Mushu
The char* returned from c_str() (or data for that matter) will reflect changes made to the string. That data is owned and maintained by the string though, so don't attempt to modify/free the data witht he pointer returned (will result in undefined behavior). But you can read from it fine, and expect it to stay "correct".
Since it's a const pointer, you can't modify the data without using a cast to begin with, which should be a tip off that something is not right.

I cast your mom's pointer last night. O HO.

LOL


..


>___>


j/k
Sign in to follow this  


1 Comment


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!