So, clearly I'm doing something wrong...
#include <iostream>
using namespace std;
class thing1
{
public:
void thingTest()
{
cout << "I AM THING 1\n";
}
};
class thing2: public thing1
{
public:
void thingTest()
{
cout << "I AM THING 2\n";
}
};
void DoStuff( thing1 temp )
{
temp.thingTest();
}
void main()
{
DoStuff( thing2() );
}
I expect this code to output:
I AM THING 2
but instead I get:
I AM THING 1
the "final" goal of this project is to create a LinkedList of classes that store tasks in the form of void WorkClass.Do( void ). Each inharted class would be a different task (most of them have to do with rendering interface with my graphics engine). I want to EnQueue the constructor, then when DoWork() is called, DeQueue WorkClass.Do() until I hit a null pointer.
I figured being able to do this simple thing would be a good start to making all that other stuff work... but as it is, I've hit a brick wall. I assume I'll have to do something with pointers...