What does cout<<stw(5)<<12<<endl; mean?

3 Answers

  • Cubbi
    Lv 7
    10 years ago
    Favorite Answer

    It is a typo from cout << setw(5) << 12 << endl;, which is a line from a C++ program, which apparently intended to output three spaces followed by the digits 1 and 2, followed by a newline character and a flush operation on the standard output stream.

  • 10 years ago

    I'm guessing stw() is the same as invoking it via a period operator

    It sets the column width of the following output to 5 (in this case)

    This lets you line up your output into columns or tables on the screen

  • 10 years ago

    columns 5 rows 12

Still have questions? Get your answers by asking now.