So, I'm working with classes in C++, and I'm not exactly the class-master, so you'll have to bear with me.
The following is my .AddNew method for my Customer class.
Now after putting some cout's and getch()s in there, I've come to the conclusion that the program errors out after changing the name, but before adding the address. I think my address strcpy is the problem. BUT, they're all the same, as far as I can tell.
BTW, the error I get is the standard Windows XP "This program sucks, so send us an error report" dialog box. My compiler is Bloodshed Dev-C++ v4.
Any help would be appreciated.
-------------------------
Just call me Captain Awesome.
The following is my .AddNew method for my Customer class.
Code:
void Customer::AddNew(char n[], char a[], char c[], char p[], float ab)
{
strcpy(n, name);
strcpy(a, addy);
strcpy(c, city);
strcpy(p, PCode);
AccBal = ab;
}
Now after putting some cout's and getch()s in there, I've come to the conclusion that the program errors out after changing the name, but before adding the address. I think my address strcpy is the problem. BUT, they're all the same, as far as I can tell.
BTW, the error I get is the standard Windows XP "This program sucks, so send us an error report" dialog box. My compiler is Bloodshed Dev-C++ v4.
Any help would be appreciated.
-------------------------
Just call me Captain Awesome.