Conversion from "" to non-sclar trpe " " requested.

Joined
Nov 16, 2008
Messages
1
Reaction score
0
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::propID=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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top