For some reason it will NOT run...help please

Write your question here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
  
#include <iostream>
#include <string>
#include <stdlib.h>
#include <iomanip>

using namespace std;

class Employee
{
private:

	int employeeId;
	string FirstName;
	string LastName;
	char employee type;
	string employee status;
	int employee assignment;


public:
	Employee();
	Employee(string, string, char, int);
	void displayEmployeeID();
	string getFirstName();
	string setFirstName(string);
	string getLastName();
	string setLastName(string);
	char getEmployeetype();
	char setEmployeetype(char);
	string getEmployeestatus();
	string setEmployeestatus(string);
	int getEmployeeassignment();
	int setEmployeeassignment(int);
};


class Employee

{

 public:

Employee();

Employee(string first, string last, char type, int assi);

 string getFirstName();
{

return firstName;

}

void setFirstName(string name);

{

firstName = name;

}

string getLastName();

{

 return lastName;

}

void setLastName(string name);

 {

lastName = name;

}

char getEmployeetype()

{

 return type;

}
void setEmployeetype(char type);

{

 switch (type)

}

{



void displayEmployee();

void Main();

{

firstName = "not given";

lastName = "not given";

void displayEmployee();

string getFirstname();

void setFirstName(string first);

string getLastName();

void setLastName(string last);

char

}
void displayEmployee()
        {
            cout<<"Employee Information\n";
            cout<<"Employee ID:\t",,employeeid<<endl;
            cout<<"First Name:\t"<<firstName<<endl;
            cout<<"Last Name:\t"<<lastName<<endl;
            cout<<"Employee Type:\t"<<type<< "\n";
            cout<<"Employee Status:\t"<<status<< "\n";
            cout<<"Employee Assignment:\t" <<assignment << "\n";

system("Pause");
return 0;
        }
};








Do you get any errors?
When I run it I keep getting "It seems that this project has been built yet"
When I run it I keep getting "It seems that this project has been built yet"


I don't what compiler do you have, but IMHO, it is garbage. You should have a long list of errors. You have syntax errors, incomplete variable declarations. and I saw a void Main C++ is character sensitive (Main() and main()) are not the same. I recommend you go back to the code and go back line by line to look for syntax errors. I placed some comments on the most common errors I found in the below code.

Furthermore, take a look at the link below on tips about how to ask questions:
http://www.cplusplus.com/forum/articles/40071/#msg218019

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#include <iostream>
#include <string>
#include <stdlib.h>
#include <iomanip>

using namespace std;

class Employee
{
private:

	int employeeId;
	string FirstName;
	string LastName;
	char employee type; // C++ does not allow two variables with one type.
	string employee status; // C++ does not allow two variables with one type.
	int employee assignment; // C++ does not allow two variables with one type.


public:
	Employee();
	Employee(string, string, char, int);
	void displayEmployeeID();
	string getFirstName();
	string setFirstName(string);
	string getLastName();
	string setLastName(string);
	char getEmployeetype();
	char setEmployeetype(char);
	string getEmployeestatus();
	string setEmployeestatus(string);
	int getEmployeeassignment();
	int setEmployeeassignment(int);
};


class Employee

{

public:

	Employee();

	Employee(string first, string last, char type, int assi);

	string getFirstName(); // No semicolon.
	{

		return firstName;

	}

	void setFirstName(string name);// No semicolon.

	{

		firstName = name;

	}

	string getLastName();// No semicolon.

	{

		return lastName;

	}

	void setLastName(string name);// No semicolon.

	{

		lastName = name;

	}

	char getEmployeetype()

	{

		return type;

	}
	void setEmployeetype(char type)// No semicolon.

	{

		switch (type)

	}

{



	void displayEmployee();

	void Main(); // Is this the main function. Then it should be int main(). No semi-colon.

	{

		firstName = "not given";

		lastName = "not given";

		void displayEmployee();

		string getFirstname();

		void setFirstName(string first);

		string getLastName();

		void setLastName(string last);

		char  // Where is the variable?

	}
	void displayEmployee()
	{
		cout << "Employee Information\n";
		cout << "Employee ID:\t", , employeeid << endl; // It should be << employeeid <<.
		cout << "First Name:\t" << firstName << endl;
		cout << "Last Name:\t" << lastName << endl;
		cout << "Employee Type:\t" << type << "\n";
		cout << "Employee Status:\t" << status << "\n";
		cout << "Employee Assignment:\t" << assignment << "\n";

		system("Pause");
		return 0;
	}
};

Last edited on
Topic archived. No new replies allowed.