Abstract
In this chapter we'll look at repeated actions, input, and things to do with the character type.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
I could have called it sin and waited for the puns to start, but sin already means something in C++: the sine function. “S-in” might be a good way to pronounce it.
- 2.
This is from the g++ compiler. Visual Studio gave me three lines and clearly identified << as the problem. Nice!
- 3.
Some compilers aren’t up to speed on this, and let the variables stay defined after the loop. Solution: declare the variable before the loop. Better yet, upgrade your compiler.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Will Briggs
About this chapter
Cite this chapter
Briggs, W. (2019). Loops, Input, and char. In: C++ for Lazy Programmers. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-5187-4_5
Download citation
DOI: https://doi.org/10.1007/978-1-4842-5187-4_5
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-5186-7
Online ISBN: 978-1-4842-5187-4
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books