Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Vector iterations not calling function

$
0
0
Here is the vector iteration loop:
for(size_t i = 0; i < gameObjects.size(); ++i)
{
	gameObjects.at(i).Draw(window);
}



gameObjects contains a Ground and a Player (both are derived from GameObject) but neither one of their Draw() functions are called.

I have this same loop later with .Update() instead of .Draw(), and that one doesnt work either.

Using the debugger is see that the line
gameObjects.at(i).Draw(window);
is run, but the program never enters the function .Draw().

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>