Strings problem in GCC
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
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");
my_strcp(dest,"This is a string which will be splited on two lines. "
"Now we are on the second line");
"this is a very long string \
you can split it up with a slash (slash needs to be followed by a newline)"
you can split it up with a slash (slash needs to be followed by a newline)"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement