C++-typedef_function

Step: 1 Create new Project

Step: 2 Add a new source file

Step: 3 edit the codes

#include <iostream>
#include <stdio.h>
using namespace std;
typedef string newEmp;
//typedef data-type name
newEmp emp1(string number);
newEmp emp2(string number);
newEmp emp3(string number);

int main()
{
cout<<"New Employee Orientation "<<endl;
string str = "\tWelcome\n";
newEmp orientation ;
orientation = emp1(str);
cout << "Hello " << orientation;
orientation = emp2(str);
cout << "Hello" << orientation;
orientation = emp3(str);
cout << "Hello " << orientation;
return 0;
}

newEmp emp1(string number)
{
cout<<"-----------\n";
return ("emp1" + number);
}
newEmp emp2(string number)
{
cout<<"-----------\n";
return ("emp2" + number);
}
newEmp emp3(string number)
{
cout<<"-----------\n";
return ("emp3" + number);
}

Step: Runtime view

Step:

Step: