Can someone tell me how I would store multi line text?
eg
orCode:char *text = "AAA [Date] BBB [Time]"
Also, how do I escape '['??Code:char text[] = {AAA [Date] BBB [Time]};
Thanks
Can someone tell me how I would store multi line text?
eg
orCode:char *text = "AAA [Date] BBB [Time]"
Also, how do I escape '['??Code:char text[] = {AAA [Date] BBB [Time]};
Thanks
Haven't you used '\n' in printf() before?Code:char text[] = "AAA [Date]\nBBB[Time]";
What if I have huge amount of text? Do I need to aaa\nbbb\nccc\n ?? Is that the only way?
if you have a 'huge' amount of text maybe read it in from a file
And if it's incredibly huge and requires a file, don't bother storing it in one array like that.
the strings will be joined together as if you wrote:Code:char *text = "AAA [Date]" "BBB [Time]";Code:char *text = "AAA [Date]BBB [Time]";