Beginner Tutorial 9

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
insalt
Posts: 2
Joined: August 4th, 2019, 10:00 pm

Beginner Tutorial 9

Post by insalt » August 4th, 2019, 10:10 pm

Hi everyone,

It's the second time now that this happens to me :cry: . I try to build so awesome stuff ;) .
InteliSense says there are now problems what so ever, but then the compiler comes in and
seems to suddenly just not identify some links. In this case between Poo-Class files.
It would be really awesome if someone could tell me if I'm actually retarded or if it works for u guys :evil: .
I attached the solution as a zip...
Engine.rar
suspicious_code
(1.8 MiB) Downloaded 123 times
Thanks already!
Happy coding :)

insalt

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

Re: Beginner Tutorial 9

Post by albinopapa » August 5th, 2019, 6:04 am

Code: Select all

#pragma once

#include "Poo.cpp"

class Poo
{
You should never #include a .cpp file anywhere.
Also, in Poo::draw() you have Graphics::PutPixel calls, but PutPixel is a non-static member function of Graphics so you need a Graphics object or reference to be able to call that function. You can #include "Graphics.h" in Poo.h, then pass a Graphics& gfx in Poo::draw, Poo::draw( Graphics& gfx ), then call the PutPixel function like gfx.PutPixel( x, y, red, green, blue );
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

insalt
Posts: 2
Joined: August 4th, 2019, 10:00 pm

Re: Beginner Tutorial 9

Post by insalt » August 5th, 2019, 9:35 am

Wow, thank you so much. So i actually did screw something up.
It definitely works better now and I think I'll remember that from now on :D!

insalt

Post Reply