Adv2 Transformations
Adv2 Transformations
I don't know what I'm doing wrong , but the compiler is complaining about the e1 obj.
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Adv2 Transformations
Right off the bat the compiler tells me: "There is no default constructor for class 'Entity' "
Being in the advanced series debugging should be getting easier for you.
This error message means that the class Entity doesn't have a default constructor or a constructor that doesn't take any parameters. You only have a constructor for Entity that takes an std::vector<Vec2> and you don't provide a vector of Vec2 objects in the Game constructor. You aren't creating a polyline until Game::ComposeFrame(), but I'm pretty sure that should be the vector<Vec2> object that initializes 'e1'.
The other thing is your inclusion of the Entity.h file is in Game.cpp so the compiler doesn't know what Entity is in Game.h.
Fix those two things and the program compiles and creates a green star.
Being in the advanced series debugging should be getting easier for you.
This error message means that the class Entity doesn't have a default constructor or a constructor that doesn't take any parameters. You only have a constructor for Entity that takes an std::vector<Vec2> and you don't provide a vector of Vec2 objects in the Game constructor. You aren't creating a polyline until Game::ComposeFrame(), but I'm pretty sure that should be the vector<Vec2> object that initializes 'e1'.
The other thing is your inclusion of the Entity.h file is in Game.cpp so the compiler doesn't know what Entity is in Game.h.
Fix those two things and the program compiles and creates a green star.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
Re: Adv2 Transformations
Now I'm getting assertion fail cannot seek value initialized vector iterator. Tried to google it , but not sure what it all means
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Adv2 Transformations
Are you trying to access passed the end of the vector range?
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
Re: Adv2 Transformations
Seems so I guess. anyway time to review some earlier tutorials. LoL