using namespace std;
string FirstName, MiddleName, LastName, fullName;
cout << "PLease enter your FullName:" << endl;
getline (cin, fullName);
FirstName = FirstName.substr(1, FirstName.length());
MiddleName = MiddleName.substr(1, MiddleName.length());
LastName = LastName.substr(1, LastName.length())
cout << "First Name: " << FirstName << endl;
cout << "Middle Name: " << MiddleName << endl;
cout << "Last Name: " << LastName << endl;
i`m getting a c2146 full name.cpp(12): error C2146: syntax error : missing ';' before identifier 'cout'.can someone please help me iy`s urgent!!!
You are missing a ';' somewhere before that cout.
Also, wrong section.
What is this doing in Articles? Please move it to beginners. And you are missing a semicolon after your assignment to LastName.
ok thanks,got,i`m new to the site so i`m still a bit new to this but thanks for quick reply!!
sori,but it gives me a debug error? anyone know how i can fix it? the sooner o can fix it the sooner i can erase the post.
You seem to have an error with your design. Look up substr() again, because as is, your code won't get you the names.