Distribute String to multiple lines

Hey Guys,

in my code, I have to deal with some long (constant) strings, like:

s = _T("The quick brown fox jumps over the lazy dog");

Having such long lines is sometimes anoying and I am looking for a way to spread this over multiple lines.

I am looking for something like

1
2
s = _T("The quick brown fox")
  + _T("jumps over the lazy dog");

or

1
2
s = _T("The quick brown fox \\
jumps over the lazy dog");


and not like

1
2
s = _T("The quick brown fox")
s += _T("jumps over the lazy dog");


Is something like this possible?
In C++ you can simply break the string into multiple quotes sections with witespace in between like this:

1
2
3
4
const char* common_expression =
    "The quick brown fox"
    " jumps over"
    " the lazy dog";


Note that there is no punctuation between closing the quotes and opening them again.
Cool, thanks!
Topic archived. No new replies allowed.