+ 1
What is the opposite of endl or /n ?
6 Respuestas
0
There is no much difference but here goes this logic.
I use "endl" to create a new line when my cout prints an initialized or assigned variable at the end of cout statement..
example:-
int x = 6;
cout << x << endl;
I use "\n" to create a new line when i know my cout prints a string that is not initialized at then end of cout statement.
example:-
int age = 12;
cout << "I am " << age << " years old.\n";
0
I mean to know the keyward to go back to one line before.
eg endl is used to go to next line but can we go back to previous line also?
0
\b
0
what may be the opposite of space.
0
oops ya u r right its opposite of space
0
my bad, I assumed your meaning of opposite was "difference between".
well. I think carriage return might do the trick \r. but i am not to sure of your question.