How to run methods in an object in a vec
How to run methods in an object in a vector
Aug 12, 2018 at 4:26am UTC
How would I do this? I have this code:
->debugLetters[i].draw(graphics, 0, 0);
debugLetters is a vector of Sprites, which has a method called draw(). The arguments are all correct, so why wouldn't this work?
Aug 12, 2018 at 4:52am UTC
Is debugLetters a vector of Sprites, or a vector of
Aug 13, 2018 at 2:04am UTC
It's a vector of Sprites. Do I need it to be a vector of pointers?
Aug 13, 2018 at 3:19am UTC
What's the error you're getting?
Aug 13, 2018 at 5:06am UTC
Never mind. Thanks for all your replies, but I've fixed it now.
Registered users can post here.
Sign in or register
General C++ Programming
© cplusplus.com, 2000-2017 - All rights reserved -
Spotted an error? contact us