Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 1.08 KB

CppWhile.md

File metadata and controls

20 lines (14 loc) · 1.08 KB

Keyword for program flow, similar to a for loop.

while (/* condition */)
{
  //Perform this while condition is true
}
  • [1] Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 9.8. Advice. page 240: '[4] Prefer a for-statement to a while-statement when there is an obvious loop variable'
  • [2] Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 9.8. Advice. page 240: '[5] Prefer a while-statement to a for-statement when there is no obvious loop variable'