Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ array sizeof

#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 #sizeof
ADD COMMENT
Topic
Name
6+1 =