Hi All
I tried to construct an array of structs, but it doesn't compile
I guess I do something fundamentally wrong here! Any suggestions ?Code:#include <stddef.h> #include <stdlib.h> #include <regex.h> #include <stdio.h> #include <string.h> struct Abc { int *x ; } *st ; int main(void) { st = malloc( 2 * sizeof(*st) ) ; st[0] = (struct Abc*)malloc(sizeof(struct Abc) ) ; st[1] = (struct Abc*)malloc(sizeof(struct Abc) ) ; }
thnx
LuCa



LinkBack URL
About LinkBacks


