Arrays in CPP
Created: November 10, 2018 by [lek-tin]
Last updated: November 10, 2018
To get the number of elements in an array in C++:
sizeof(awesomeArray)
= total number of bytes allocated for awesomeArray
array.
Divide it with the size of one element in the array will give you the number of elements in the array: sizeof(awesomeArray)/sizeof(awesomeArray[0])