C++ examples for Data Type:struct
An array of struct
typedef struct { int i, j, k;/* ww w. j a v a 2s . com*/ } ThreeDpoint; int main() { ThreeDpoint p[10]; for(int i = 0; i < 10; i++) { p[i].i = i + 1; p[i].j = i + 2; p[i].k = i + 3; } }