All pastes #272897 Raw Edit

Mine

public cpp v1 · immutable
·published 2006-12-09 11:50 UTC
rendered paste body
########################GOBJ/GObj.h###################ifndef _GOBJ_#define _GOBJ_namespace GRAV{	class GObj	{		public:			GObj();			virtual ~GObj();		protected:		private:	};}#endif // _GOBJ_##############################################################################################GObj/GObj.cpp#########################include "GObj.h"namespace GRAV{    GObj::GObj()	{		//ctor	}	GObj::~GObj()	{		//dtor	}}#########################################################################################GConsole/GConsole.h######################ifndef _GCONSOLE_#define _GCONSOLE_#include <string>#include <vector>#include <map>#include "../GLog/GLog.h"#include "../GObj/GObj.h"namespace GRAV{	class GConsole	{		public:			GConsole (GRAV::GLog& log, const std::string& welcome = "");			virtual ~GConsole();			/********************			 * Return code definitions:			 *      0: normal exit			 *     -1: not understable stuff			 *******************/			int GMainLoop (void);		private:			int TestCommand (std::string& command);			GRAV::GLog& myLog;			std::map<std::string, GObj> myUniverse;			std::string mySaveCommand;	};}#endif // _GCONSOLE_##############################################################################GConsole/GConsole.cpp########################include "GConsole.h"using namespace std;namespace GRAV{	int GConsole::TestCommand (string& command)	{		//Extract all the command and argument		string Mcommand = command + " ";		vector<string> Arg;		while (Mcommand.find (" ") != string::npos)		{			//cout << "Test !" << endl;			Arg.push_back (Mcommand.substr (0, Mcommand.find (" ") ) );			Mcommand = Mcommand.substr (Mcommand.find (" ") + 1, Mcommand.size() );		}		//Mhhhh... I just love If !		if (Arg[0] == "test")			this->myLog.GLogg ("It's just a sample test. It should be deleted further.\n");		else if (Arg[0] == "new")		{			if(Arg[1] == "SolarSystem")                  /******************                   * The error is here:                   *****************/                  //myUniverse[Arg[2]] = Gobj();                  GObj test;                  myUniverse[Arg[2]] = test;		}else if (Arg[0] == "set")		{			//change some stuff		}else if (Arg[0] == "del")		{			//delete some stuff		}else if (Arg[0] == "draw")		{			//draw some stuff		}else if (Arg[0] == "exit")		{			return 0; //just exit		}else if (Arg[0] == "show")		{			//show some stuff		}else if(Arg[0] == "save")		{		    //save all the stuff		}else if(Arg[0] == "reset")		{		    this->mySaveCommand = "";        }else //not-understable stuff		{			return -1;		}		return 1; //Ugly stuff hihihihi	}}################################################################################################################################################COMPILER ERROR:#######################GConsole/GConsole.cpp:62: error: ‘test’ was not declared in this scope:: === Build finished: 1 errors, 0 warnings ===