Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ array size

#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;
}
 
PREVIOUS NEXT
Tagged: #array #size
ADD COMMENT
Topic
Name
8+9 =