this is my header:
#ifndef HEADER_H
#define HEADER_H
class Math
{
private:
static enum names {amin = 27 , ali = 46};
public:
static void displayMessage();
}
#endif // HEADER_H
and this is the header definition:
#include <iostream>
#include <iomanip>
#include "Header.h"
using namespace std;
void Math::displayMessage()
{
cout<<amin<<setw(5)<<ali<<endl;
}
and this is the main:
#include <iostream>
#include "Header.h"
using namespace std;
enum Math::names;
int main()
{
Math::displayMessage();
}
i got these errors:
error C2143: syntax error : missing ';' before 'using'
error C2143: syntax error : missing ';' before 'using'
one of them is for main and the other is for header definition, i have encountered several time in my programming, could explain that for me in this situation,
please help me
best regards
Amin khormaei