(ref.doc)ccuj-dec01

Next ccuj-jan02 Prev: ccuj-sep01 Up: CCUJ

C/C++ Users Journal
December 2001
Internet & Network Programming

p 56 C++ Made Easier, by Andrew Koenig and Barbara Moo
A New Look at for Statements
   int sum = 0;
   for (int x; std::cin >> x; ) sum += x;
 is equivalent to (and better than):
   int sum = 0;
   int x;
   while (std::cin >> x) sum += x;

automatically generated by info2www version 1.2.2.8