#include <iostream> #define ARRAYSIZE(array) (sizeof(array)/sizeof(array[0])) int main() { int myArray[] = {1,5,46,2,45,7,5}; std::cout<< ARRAYSIZE(myArray); return 0; }