is it possible to have two parts of text on the one line?
eg:
i know the above way is not possible but does anyone know a way of doing this??Code:cout<<"hello" <<start "hi again" << endl;
is it possible to have two parts of text on the one line?
eg:
i know the above way is not possible but does anyone know a way of doing this??Code:cout<<"hello" <<start "hi again" << endl;
Try this.
Code:cout<< "hello" << start << "hi again" << endl;
Note: start should be a variable name.Originally posted by SourceCode
Try this.
Code:cout<< "hello" << start << "hi again" << endl;
Because if it's somehting else, it might not work!
also the output is always in the same line until you want to have a newline.
Example:
cout << "hi";
cout << ", how are you.";
will output:
hi, how are you.
Does this answers your question.