Hi All,
I'm not a regular C++'er , so maybe this will be easy.
I have 3 classes Driver , Savings & Customer.
Savings public inherits Customer.
The varibles in Customer is CustNumber (char*)
CustName, (char*)
CustTelNo. (long)
The Savings class has a constructor that accepts a char* it looks like this :
Savings(char* TempCustNum):Customer(TempCustNum){};
and then the Customer Constructor looks like this:
Customer(char* TempCustNum){
CustNumber = TempCustNum;
cout << "Enter the Customer number";
cin >> CustName;
}
so this is what happens
In the driver I ask for a customer number , get it & then
constuct a instance of the savings class with the number that i just got from the user , the Savings class's constructor then calls the Customer class constructor , withc then set the CustNumber varible , & then asks for a Name , this is where the error steps in the moment I press Enter after I typed in the Customer Name
It goes back to the Borland compiler with a message box and says something about a execption error occured & give some memmory adress.
PLEASE HELP ME OUT OF MY MISSERY , I have no idea what to do. :-(
Thanks
I'm not a regular C++'er , so maybe this will be easy.
I have 3 classes Driver , Savings & Customer.
Savings public inherits Customer.
The varibles in Customer is CustNumber (char*)
CustName, (char*)
CustTelNo. (long)
The Savings class has a constructor that accepts a char* it looks like this :
Savings(char* TempCustNum):Customer(TempCustNum){};
and then the Customer Constructor looks like this:
Customer(char* TempCustNum){
CustNumber = TempCustNum;
cout << "Enter the Customer number";
cin >> CustName;
}
so this is what happens
In the driver I ask for a customer number , get it & then
constuct a instance of the savings class with the number that i just got from the user , the Savings class's constructor then calls the Customer class constructor , withc then set the CustNumber varible , & then asks for a Name , this is where the error steps in the moment I press Enter after I typed in the Customer Name
It goes back to the Borland compiler with a message box and says something about a execption error occured & give some memmory adress.
PLEASE HELP ME OUT OF MY MISSERY , I have no idea what to do. :-(
Thanks