|
|
Output with coutOutput in C++ uses an object cout where you can stream your data to the output. Notice that the arrows point from the data to cout, as opposed to what happens with cin:
Each item is placed in the output stream after the other with NO SEPARATION. If you want to separate the output, you have to do that yourself. cout<<"this"<<"is"<<"it"; will write: thisisit cout<<"this"<<" "<<"is "<<"it"; will write: this is it The "endl" symbol is defined in "iostream.h" and can be useful to help your formatting: cout<<name<<endl<<address; // line 1 has name, line 2, address
|