This program should produce the following output: Charles King King, Charles Ric
ID: 3641351 • Letter: T
Question
This program should produce the following output:
Charles King
King, Charles Rick
Mr. Yogi The Bear
Press any key to continue . . .
but i had following code and didnt work why
#include <iostream>
#include <string>
using namespace std;
#include "name.h"
int main()
{
name X,Y;
X.First = "Charles";
X.Middle = "Rick";
X.Last = "King";
X.Title = "Prof.";
Y.First = "Yogi";
Y.Middle = "The";
Y.Last = "Bear";
Y.Title = "Mr.";
cout << X.Common() << endl;
cout << X.Sorting() << endl;;
cout << Y.Formal() << endl;
system("pause");
return 0;
}
Explanation / Answer
Please rate...
Try to include the contents of the header file "Name.h" in the question....:)...
so that the errors can be found out
OR
The error might be because of not including the file "#include<stdlib.h>".....
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.