array of structure problems
Hi all,
Im trying to make an array of structures
Code:
struct infoAttr{
char Name[20];
int age
};
infoAttr p1 = {"mike", 20};
infoAttr p2 = {"Dave",23};
infoAttr p3 = {"Alex", 23};
infoAttr people[3] = {p1,p2,p3};
Im getting an error with the last line saying:
"error C2440: 'initializing' : cannot convert from 'struct infoAttr' to 'char'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called"
Its probably really simple but its got me stumped.
Thanks