Hello. I'm trying to figure out why I get a compile error (in the subject of this message) for this cast during the initialization of a struct member variable.
in myclass.hclass MyClass {...public:struct cpresets {char* soundfont_key;char* exists;UT_hash_handle hh;};...};in myclass.ccvoid myclass::mymethod() {...struct cpresets *newpreset;newpreset = (cpresets*) malloc(sizeof( cpresets));...}There is another place in the cc file where this works.in myclass.cc...typedef struct {...}mystruct;...static instantiate(){...//this line causes the compile errormystruct* me = (mystruct*) malloc(sizeof(mystruct));...}I see the difference in the case where it works is that the struct is defined in the cc file and in the case where it doesnt work, the struct is a member vairable of the class header. Do you know why this is an issue or what I might be able to do to fix it?Thanks.Bill.
_______________________________________________
gtk-list mailing list
gtk-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-list