QString in a struct
Solved
General and Desktop
-
I have some code that allocates an array of structs, and in each string is a QString (not a QString*).
I find that when I delete that array, I get an error: malloc is trying to do a bad free.
Is it not allowed to put a QString in a struct or array of structs?struct foo { QString s; int i; }; int main() { struct foo *f = new struct foo [100]; delete f; // error }