i've got such problem.I have enumeration declared in main.h header file and i wont to use it in files name.cpp ans name.h wich have definition and declaration of class name. And when i'm using enumeration in name.cpp everythink works fine but when i'm trying to use it in name.h it says unidentifed symbol
main.h file
Code:
#ifndef _MAIN
#define MAIN
enum
{
Number=7,
Unitcount=3
};
#endif
name.cpp
Code:
#include<iostream.h>
#include"main.h"
#include"name.h"
name::name()
{
for (int i=0;i<Unitcount;i++)
{
a[i]=Number;
}
}
name::~name()
{
}
name.h that works fine and now when i try to substitute 3 with Unitcount it says unidentified symbol 'Unitcount' and if i try to include main.h in here then it says multiple declaration
Code:
#ifndef _MODIFIERSET
#define MODIFIERSET
class name
{
public:
name();
~name();
private:
int a[3];
};
#endif
what's wrong or how to do it?