Page 1 of 1

Beginner Tutorial 9

Posted: August 4th, 2019, 10:10 pm
by insalt
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 127 times
Thanks already!
Happy coding :)

insalt

Re: Beginner Tutorial 9

Posted: August 5th, 2019, 6:04 am
by albinopapa

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 );

Re: Beginner Tutorial 9

Posted: August 5th, 2019, 9:35 am
by insalt
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