Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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>".....

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote