Adv2 Transformations

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
User avatar
emily
Posts: 22
Joined: November 9th, 2019, 9:04 pm
Location: Kentucky

Adv2 Transformations

Post by emily » May 11th, 2020, 9:45 pm

I don't know what I'm doing wrong , but the compiler is complaining about the e1 obj.
Advanced 2 Transformations - Copy -.zip
(104.97 KiB) Downloaded 208 times

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Adv2 Transformations

Post by albinopapa » May 12th, 2020, 2:42 am

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.
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

User avatar
emily
Posts: 22
Joined: November 9th, 2019, 9:04 pm
Location: Kentucky

Re: Adv2 Transformations

Post by emily » May 12th, 2020, 7:19 pm

Now I'm getting assertion fail cannot seek value initialized vector iterator. Tried to google it , but not sure what it all means :?:

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Adv2 Transformations

Post by albinopapa » May 12th, 2020, 8:07 pm

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

User avatar
emily
Posts: 22
Joined: November 9th, 2019, 9:04 pm
Location: Kentucky

Re: Adv2 Transformations

Post by emily » May 13th, 2020, 12:43 am

Seems so I guess. anyway time to review some earlier tutorials. LoL

Post Reply