A
AMT2K5
Hello, how would I go about breaking up a string that is returned by a
function. After I do that, I will strcpy that data to a class data
member [which I know how].
I have the following functions
void Account::getPhoneNumber(char st[]) //Retrieves the phone number
{
}
void Account::getLastName(char st[]) //Retrieves the last name
{
}
void Account::getFirstName(char st[]) //Retrieves the first name
{
}
void Account::getCity(char st[]) //Retrieves the city name
{
}
and the following function returns the string, getCustomer();
which has the string: "James,Harry,Toronto,416-555-5555;"
So the delimiter is a comma with the final data having a semicolon at
the end.
Appreciate any help, thanks in advance.
function. After I do that, I will strcpy that data to a class data
member [which I know how].
I have the following functions
void Account::getPhoneNumber(char st[]) //Retrieves the phone number
{
}
void Account::getLastName(char st[]) //Retrieves the last name
{
}
void Account::getFirstName(char st[]) //Retrieves the first name
{
}
void Account::getCity(char st[]) //Retrieves the city name
{
}
and the following function returns the string, getCustomer();
which has the string: "James,Harry,Toronto,416-555-5555;"
So the delimiter is a comma with the final data having a semicolon at
the end.
Appreciate any help, thanks in advance.