Here is my code...
#include <iostream>
#include <cstring>
using namespace std;
class employee{
public:
char name[64];
long employee_id;
float salary;
void show_employee(void);
};
};
{
cout<<"Name:"<<name<<endl;
cout<<"ID:"<<employee_id<<endl;
cout<<"Salary:"<<salary<<endl;
};
};
int main(void);
{
char str1[40]="employee worker";
char str2[40]="employee name";
char str3[40]="employee boss";
char atr4[40]="employee name";
strcpy (worker.name, "John Doe");
worker.employee_id = 12345;
worker.salary = 25000;
strcpy (boss.name, "Happy Jamsa");
boss.employee_id = 101;
boss.salary = 101101.00;
worker.show_employee();
boss.show_employee();
return 0;
};
};
it may be just something i'm missing cuz of working so hard on trying to figure it out. please can somebody tell me what is wrong with my code?
Here are the errors i get with this code...
D:\users\student\My Documents\first program\empclass.cpp|15|error: expected declaration before '}' token|