strings don't work in header files

is this normal?

my program won't recognise strings in header files
1
2
3
4
5
class CGame
{//this class is responsible for running the game
public:
CFileStorage qSave;
string sPlayerName;
Are you including <string>?
yes I calling the string library inside my main() function.

the last time I checked header files work inside the place they are included
do I have to include the <string> & also any special classes inside the header files
can you include header files in other header files
yes you can: http://cplusplus.com/forum/articles/10627/#msg49679 <- see section 4

also note you probably need std::string and not string
and also why can't it recognise fstream
I mean I tried to call ifstream from inside the class in my header file
You can't call ifstream, it's a class, not a function.

Can you be more specific about what you're doing? (read: post code)
Topic archived. No new replies allowed.