तो मैं कोशिश कर रहा हूँ को हल करने के लिए निम्न कार्य:
नीचे दिए गए कोड है कि मैं के साथ आया हूँ. मैं कर रहा हूँ मुसीबत के भंडारण के डेटा सही ढंग से और मैं कर रहा हूँ यकीन नहीं है, जहां डाल करने के लिए पढ़ें() और आउटपुट() समारोह. यह शायद नहीं है सब बहुत मुश्किल है, लेकिन मैं अभी भी कर रहा हूँ यकीन नहीं है । कर सकते हैं किसी को हो सकता है मुझे एक संकेत दे? धन्यवाद!
#include <iostream>
#include <iomanip>
using namespace std;
class Employee
{
public:
string name, department;
int age;
void output(string &a, int &b, string &c)
{
cout << name << endl;
cout << "Age: " << age << " years" << endl;
cout << "Department: " << department << endl;
}
void read(int &n)
{
cout << "Enter number, last name and first name:";
cin >> name;
cout << "Enter age:";
cin >> age;
cout << "Enter department:";
cin >> department;
}
};
int main() {
int n;
cout << "Enter number of employees: ";
cin >> n;
Employee* o = new Employee;
Employee employee;
delete o;
}