[solved] deal cards and add to the scene
-
Just allocate your Cards on the heap and not on the stack
-
Because somewhere in your code you are doing a copy. Are you using a QList<Card> or something similar ?
-
I saw your reply in my other post and I indeed did do copies by using vector. I'm changing my code around now.
Check this line @ vector<Card*> * player = new vector<Card*>; @ Is it correct? And if so, how do I iterate through player? I'm getting a little confused with all these pointers.
-
Just use vector<Card *> player, there's no need of a pointer for the vector
-
With
@(*iter)->GetSuit();@
You should be good
-
Sorry, there was a mistake in my code example
-
Yes, sometimes it's a simple thing :) But can be hard to track down :-D