C++ examples for Data Type:Array
Using a range based for loop with a C-style array
#include <cinttypes> #include <iostream> using namespace std; int main(int argc, char* argv[]) { const int numberOfElements{ 5 }; int32_t normalArray[numberOfElements]{ 10, 65, 3000, 2, 49 }; for (auto&& number : normalArray) {// ww w. j a v a 2 s .c om cout << number << endl; } return 0; }