Bold code has been changed. Read the comments, they might help you understand
#include <iostream>
#include <fstream>
#include <string>
#include <cctype>
#include <cstdlib>
using namespace std;
class Employee
{
private:
int id, years;
string sex;
float wage;
public:
Employee(int, string, float, int);
void makeString();
};
Employee :: Employee(int in_id, string in_sex, float in_wage, int in_years)
{
id=in_id;
sex=toupper(1); // I'm not that familiar with toupper, but it requires an integer, not string. I think it might be for changing the amount of bytes in the string. sex.size() might work
wage=in_wage;
years=in_years;
}
void Employee::makeString()
{
string profile[4]; // This wasn't an array originally
profile[0]=id;
profile[1]=sex;
profile[2]=wage;
profile[3]=years;
}
int main()
{
Employee emp1(0002,"m",25,10); // m is not a variable, it is a string
emp1.makeString();
system("PAUSE");
return 0;
}