How I can get multiple cout?

Dec 10, 2009 at 5:11pm
I need to get a "cout" to print multiples times without
having to do the "cout" manualy?

Is there anyway to do it?
Dec 10, 2009 at 5:29pm
Do it in cycle.
Dec 10, 2009 at 5:36pm
closed account (S6k9GNh0)
From what your saying, it sounds like your problem could easily be fixed with a loop.

1
2
3
4
for (int j = 0; j == 10; j++)
{
   std::cout << "I've executed this statement" << j << "times" << std::endl;
}
Dec 11, 2009 at 1:55am
printf, or make a menu function or some such that takes an array as parameter and prints out menu using a for loop.
or
simply:
1
2
3
4
5
 cout << "something" << endl << "something else" << endl
    << "some more stuff" << endl << "omg does it ever end"  << endl
    << "I think we might" << endl << "be almost done" << endl
    << "but you never know.... " << this << "is probably the end" << endl
    << "yep" << endl;
Last edited on Dec 11, 2009 at 1:56am
Topic archived. No new replies allowed.