Strings not working (sometimes)

In one of my header files, I have this simple thing:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef COORDSYS_H
#define COORDSYS_H
#include <string>

class coordsys
{
    public:
        coordsys();
        void initcoord(int x, int y, int z);
        int getx(string it);
        int gety(string it);
        int getz(string it);
    protected:

    private:
};

#endif // COORDSYS_H 


However, on building, I get this:

error: 'string' has not been declared

You'll notice that I made sure to specifically include string.

Strings work fine in my main.cpp. Did I do something wrong? Is Code::Blocks glitching out?
The string class is in the std namespace.

1
2
3
int getx(std::string it);
int gety(std::string it);
int getz(std::string it);


Thanks bro
Topic archived. No new replies allowed.