I am doing a program that I have to type 2 Customers name, match the customers name with each other, and how letters is in there. So far I have is:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string cust1fullname, // declare a string object
cust2fullname,
cust1lastname,
cust1firstname,
cust2lastname,
cust2firstname;
int c, value;
cout << "Enter cust1first name: ";
cin >> cust1firstname;
cout << "Enter cust1last name: ";
cin >> cust1lastname;
cout << "Enter cust2first name: ";
cin >> cust2firstname;
cout << "Enter cust2last name: ";
cin >> cust2lastname;
getline(cin, cust1fullname);
getline(cin, cust2fullname);
cout << "The string just entered is: "
<< cust1fullname;
cout << "The string just entered is: "
<< cust2fullname;
cout << "The number of characters in cust1full name is " << value << endl;
cout << "The number of characters in cust2full name is " << value << endl;
cust1lastname = cust1fullname.substr(c+1,99);
cust1firstname = cust1fullname.substr(c+1,99);
cust2lastname = cust2fullname.substr(c+1,99);
cust2firstname = cust2fullname.substr(c+1,99);
cout << "Your cust1last name is " << cust1lastname << endl;
cout << "Your cust1first name is " << cust1firstname << endl;
cout << "Your cust2last name is " << cust2lastname << endl;
cout << "Your cust2first name Is " << cust2firstname << endl;
return 0;
}
I NEED HELP!!