this goes fine: string strMystring;
this goes wrong: string GetTimeString();
error 'string' does not name a type
I'm using dev-C++
any idea's or a quick work around.. I want to go on with my game
moar coad!
call me stupid but I don't get it
You aren't naming the string...
Use:
string strMystring = GetTimeString(); //or string strMystring(GetTimeString());
[EDIT]
If you're trying to define a function prototype, maybe you need to put the namespace in? I'm not sure why you would have to if you're already using strings fine, but I haven't used Dev C++ in awhile...
std::string GetTimeString();
more code
no ! I want to make a function GetTime string() that returns a string...
string GetTimeString(); is just the declaration
h and cpp file added
I looked at engine.h, looks like you aren't including <string>
... you never actually include <string>, and you don't use the namespace. FAIL.
I include <string> in engine.cpp before engine.h but not using namespace could be the problem..
[edit] that does the job !!!
thnx .. I need coffe I think
I include <string> in engine.cpp before engine.h...
I think it would be more correct to include <string> in engine.h. **Shifty eyes**