Hi All,
I am new to C++ and have this poject to finish by end of next week. I am getting error for the following code...
=======
class Property{
private:
//private method that uses the static state of class
int newID();
protected:
long price;
string address;
string type;
static int propID; //Static Index number for searching purpose
public:
Property(string anAddress, long aPrice, string hType);
Property(string anAddress, long aPrice);//needed to display + overload later
Property(string anAddress);
virtual ~Property(); //Destructur for the Property Class
Property operator + (Property); // Operator Overload
bool operator == (Property); //Operator overload
virtual void display();
virtual void changePrice(long);
};
int Property:ropID=323500; //Initialise the static ID number
//........
int main (){
//.....
Property prop1 = new Property("Address in Las Vagas");
Property* prop1Ptr = &prop1;
prop1Ptr->display();
//....
}
I get above error in line
Property prop1 = new Property("Address in Las Vagas");
Basically I have hit a brick wall.
Thanks in advance for your help.
I am new to C++ and have this poject to finish by end of next week. I am getting error for the following code...
=======
class Property{
private:
//private method that uses the static state of class
int newID();
protected:
long price;
string address;
string type;
static int propID; //Static Index number for searching purpose
public:
Property(string anAddress, long aPrice, string hType);
Property(string anAddress, long aPrice);//needed to display + overload later
Property(string anAddress);
virtual ~Property(); //Destructur for the Property Class
Property operator + (Property); // Operator Overload
bool operator == (Property); //Operator overload
virtual void display();
virtual void changePrice(long);
};
int Property:ropID=323500; //Initialise the static ID number
//........
int main (){
//.....
Property prop1 = new Property("Address in Las Vagas");
Property* prop1Ptr = &prop1;
prop1Ptr->display();
//....
}
I get above error in line
Property prop1 = new Property("Address in Las Vagas");
Basically I have hit a brick wall.
Thanks in advance for your help.