i have a code and it says my funtion can be a return type and something about it being new...
here it is:
Code:
#include <iostream>
using namespace std;
int emp,id_number,money,rank;
struct variable
{
int id_number;
int money;
int rank;
}
void wtf (int id_number,int money,int rank)
{
cout<<"employee# :"<<id_number<<endl;
cout<<"employee wages :"<<money<<endl;
cout<<"rank :";
switch (rank)
{
case 1:
cout<<"Low";
case 2:
cout<<"medum";
case 3:
cout<<"High";
case 4:
cout<<"Maneger";
}
cout<<endl;
cin.get();
}
int main()
{
cout<<"Number of employee's?"<<endl;
cin>> emp;
while (emp >= 1)
{
//start
variable employee;
cout<<"Id number?"<<endl;
cin>> employee.id_number;
cout<<"salery?"<<endl;
cin>> employee.money;
cout<<"level of employment?"<<endl;
cin>> employee.rank;
wtf (id_number,money,rank);
cout<<"----------------------------------------------------------"<<endl;
}
cin.get();
}