I have two header files. decimal.h and integer.h each containing their respective classes. I want to write something like this.
//integer.h
#ifndef INTEGER_H
#define INTEGER_H
#include "decimal.h"
class Integer
{
...
operator Decimal();
}
#endif
//decimal.h
#ifndef DECIMAL_H
#define DECIMAL_H
#include "integer.h"
class Decimal
{
...
operator Integer();
}
#endif
What is giving me the trouble is that since they are including each over it behaves strangely in Visual Studio and an generate strange compiler errors. Is there any way around this?