// World System
#include <iostream>
#include <vector>
#include <string>
usingnamespace std;
class World
{
public:
};
// Enemies
class Enemy : public World
{
};
class Mercenary : public World
{
};
Error 1 error C2440: 'return' : cannot convert from 'World *' to 'int' c:\users\www\documents\visual studio 2008\projects\enemies\enemies\enemies.cpp 18 Enemies
Line 18 is a blank line in both files so...I'm not sure what the issue is. Try double clicking the error and telling me what line on the code you posted it is.
because i had it trying to get object b4 they spawn.... line 40 and line 41
i just noticed it
and i also had to change int GetObject() to void GetObject and remove returnl;
how can it get an object(address) if they havent spawned it's common sense sorry im just a little slow today
thanks
Ooooh, yeah I see. It's because WorldList[index] is a World*, and you are trying to return an int. They aren't compatible. If you want to return a World*, go ahead and put a World* as the return type.