Hi all,
Im trying to make an array of structures
Im getting an error with the last line saying: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};
"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



LinkBack URL
About LinkBacks


