Abstract
In this chapter, sequences (arrays) of values, enumeration types, weather data, and board games are discussed.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Omit the = if you like: double Numbers[] {0.1, 2.2, 0.5, 0.75};.
- 2.
“Zero initialization.” If the members of your array are of a type that has 0 (or 0.0!), they’ll be set to that.
- 3.
In this illustration, I write the addresses in “hexadecimal,” that is, base 16, which is conventional. The reason it goes up by 4 each row is that I’m assuming int takes up 4 memory locations, that is, 4 “bytes.” None of this matters here, but I don’t want the C++ gods to laugh at my diagram.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Will Briggs
About this chapter
Cite this chapter
Briggs, W. (2019). Arrays and enum. In: C++ for Lazy Programmers. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-5187-4_10
Download citation
DOI: https://doi.org/10.1007/978-1-4842-5187-4_10
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