I have this in my header file:
Code:
public:
enum class Azimuth {NORD = 0,
NE = 45,
EST = 90,
SE = 135,
SUD = 180,
SO = 225,
OUEST = 270,
NO = 310,
UNSET=-1};
Azimuth& operator++();
And this in my implementation file:
Code:
Bousole::Azimuth& Bousole::Azimuth::operator++ ()
{
//*this = (*this==Azimuth::NO) ? Azimuth::NORD : *this+NE;
return *this;
}
Upon compiling, it complains that Bousole::Azimuth is not a class or namespace
g++ -Wall -g -std=c++0x -I/usr/includes/c++/4.7.1 -c main.cpp -o main.o
g++ -Wall -g -std=c++0x -I/usr/includes/c++/4.7.1 -c Bousole.cpp -o Bousole.o
Bousole.cpp:5:49: error: ‘enum class Bousole::Azimuth’ is not a class or a namespace
Bousole.cpp:5:49: error: ‘Bousole::Azimuth& operator++()’ must have an argument of class or enumerated type
make: *** [Bousole.o] Error 1