Giải thích giúp em lỗi này ạ
#include <conio.h>
#include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
typedef struct{
int day;
int month;
int year;
}Date;
typedef struct{
string name;
Date birthday;
char role[20];
float salary;
}employee;
void InitStruct(employee *myemployee){
myemployee = new employee;
cout << "Name: ";
getline(cin, myemployee->name);
fflush(stdin);
cout << "Day of birth: ";
cin >> myemployee->birthday.day;
fflush(stdin);
cout << "Month of birth: ";
cin >> myemployee->birthday.month;
fflush(stdin);
cout << "Year of birth: ";
cin >> myemployee->birthday.year;
fflush(stdin);
cout << "Role: ";
cin >> myemployee->role;
fflush(stdin);
cout << "Salary: ";
cin >> myemployee->salary;
return;
}
void display(employee *myemployee){
cout << "Name: " << myemployee->name << endl;
cout << "Birthday: " << myemployee->birthday.day << "/" << myemployee->birthday.month << "/" << myemployee->birthday.year << endl;
cout << "Role: " << myemployee->role << endl;
cout << "Salary: " << myemployee->salary << endl;
return;
}
void main(){
employee *myemployee=NULL;
InitStruct(myemployee);
display(myemployee);
return;
}
* List item