error C2011: 'Item' : 'class' type redefinition
well... i don't know how to explained this...this error just come out of nowhere, or i can''t find it...and i not really know what it's mean...
this Item class are base class for 3 sub class, and it was no problem before i add in the sub class.
here are the code of the Item class .
#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
class Item{
private:
int i_num;
string i_des;
double i_price;
int i_quan;
public:
Item(){
i_num = 0;
i_des="";
i_price=0.0;
i_quan=0;
}
Item(int I_num, string I_des, double I_price, int I_quan){
i_num=I_num;
i_des=I_des;
i_price=I_price;
i_quan=I_quan;
}
//get accestor
int getNum(){return i_num;}
string getDes(){return i_des;}
double getPrice(){return i_price;}
int getQuan(){return i_quan;}
//set accestor
void setNum(int Num){i_num = Num;}
void setDes(string Des){i_des = Des;}
void setPrice(double Price){i_price = Price;}
void setQuan(int Quan){i_quan = Quan;}
};
thankyou for everone that trying to help me...