A simple c++ program that allows the user to input and store employee data, including id and name, and then displays the records. This program can be used as a starting point for creating more complex employee record systems.
Download C++ Program to Create and Display Employee Records and more Thesis Data Structures and Algorithms in PDF only on Docsity!
#include using namespace std; class employee{ int id; char name[30]; public: void getData(){ cout<<endl<<"Enter Employee ID: "; cin>>id; cout<<endl<<"Enter Employee Name: "; cin>>name; } void putData(){ cout<<endl<<"Employee ID is: "<<id<<"\t"<<"Employee Name is: "<<name; } }; int main(){ employee e[1]; for (int i = 0; i < 1; i++){ cout<<endl<<"Enter details of"<<i+1<<"Employee"; e[i].getData(); } cout<<endl<<"Details of Employees"; for (int i = 0; i < 1; i++){ e[i].putData(); } return 0; }