I know in C++ and in PHP you can fill a string or a file with hard-coded text. If I remember correctly this is how it is supposed to look:
var <<< D
C++ doesn't have any equivalent to PHP's HEREDOC syntax.
You can, however, do this in C++:
cout << " Menu for program X\n"
" 1.Add two numbers\n"
" 2.Substract two numbers\n"
" 3.Multiply two numbers\n"
" Please pick an option from (0-3);" << endl;
Or this in C:
printf( " Menu for program X\n"
" 1.Add two numbers\n"
" 2.Substract two numbers\n"
" 3.Multiply two numbers\n"
" Please pick an option from (0-3);\n" );
fflush(stdout);
Which is directly equivalent to PHP's HEREDOC syntax:
echo <<
The above syntax for C and C++ is treated by the compiler as one long string, by stitching them together. It has no other effect on the string literal, hence the need for '\n'.