Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Raduprv

Strings problem in GCC

This topic is 5528 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a problem with the way GCC handles strings. For example, if I have this instruction: my_strcp(dest,"This is a string which will be splited on two lines. Now we are on the second line"); GCC will add a \n after "lines." So, my string will have a new line it it. Which is not nice, especially when I have long strings and I want to press enter in the middle, for readability purposes. Is there any way to solve this problem, and not have \n in the string except if I specifically request it? Height Map Editor | Eternal Lands | Fast User Directory

Share this post


Link to post
Share on other sites
Advertisement
I''m pretty sure the solution is:

my_strcp(dest,"This is a string which will be splited on two lines. "
"Now we are on the second line");

Share this post


Link to post
Share on other sites
"this is a very long string \
you can split it up with a slash (slash needs to be followed by a newline)"

Share this post


Link to post
Share on other sites

  • 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!