Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. tavianator

    Local Static variables and cout

    ok, it just seems wierd that the operator is evaluated left-to-right, but the functions aren't evaluated in that order.
  2. tavianator

    Local Static variables and cout

    could someone please explain to me why this code produces 1: 3 2: 2 3: 1 as-is, and 1: 1 2: 2 3: 3 when uncommented? int foo() { static int i = 0; return ++i; } int main(int argc, char* argv[]) { std::cout << "1: " << foo() << std::endl//; /*std::cout*/ << "2: " << foo() <<...

Part and Inventory Search

Back
Top