-
Redefinition Error
#include<iostream>
#include<fstream>
//#include "TimerType.h" /* Class Redefinition Error */
#include "ServerList.h"
#include "CustomerList.h"
Ok, I have a redefinition error for the class TimerType which is in the header file TimerType.h
I have TimerType.h included in both ServerList.h and CustomerList.h
I need to have both of those header files seperate, and have Timer.h included in there. So I need to know how I can incoparate the above headers into my main file without having this error.
-
in "TimerType.h" put some #define in there to mark the inclusion of that file, ie:
Code:
#define _TIMERTYPE_H_
then enclose your header file in a #ifndef statement:
Code:
#ifndef _TIMERTYPE_H_
#define _TIMERTYPE_H_
#define A 3
#define TAY HAMMER
#define YOU ME
#define THREE 4
...
#define AND_IM FINISHED
#endif