-
November 9th, 2012, 02:16 PM
#1
giving one line command that prints lots of lines - ostream?
I'm using cout to print lots of lines. But i want to put together them in one variable etc. Then , i want to print it.
I think i can do it with ostream but I cant do it . Is there anybody to give me an example use of ostream.
I want to use it such that:
x<< "hello" << endl;
x<< "mike" << endl;
x<< "how " << endl;
x<< "are" << endl;
x<< "you" << endl;
cout << x;
will print
hello
mike
how
are
you
How can i do it?
Thanks in advance
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|