Click to See Complete Forum and Search --> : How to concatenate long string in source code


Will Rothwell
May 25th, 1999, 05:16 AM
Hi,

I have some MessageBox with several lines of message string. If I put them on the same line in the source file they are OK but it is a pain to scroll all the way to the right just to change or see the whole message.

Is there a concatenating symbol I can use so that I may have something like:
MessageBox(NULL, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n
cccccccccccccccccccccccccccccccccccccccc",
"Error Message", MB_ICONSTOP);

I have look in the help but could not find it. Anyone has any idea? thanks.


Will

Wayne Fuller
May 25th, 1999, 05:57 AM
You don't see this to often in books but all you have to do is seperate them with quotation marks, like this.

MessageBox(NULL, "AAAAAAAAAAA"
"BBBBBBBBBBB"
"CCCCCCCCCCC"
"DDDDDDDDDDD", NULL, MB_OK);



The compiler automatically concatenates them.

Wayne