Array of Objects & Passing Objects as Function Arguments in C++
// #include<iostream> // using namespace std; // class Employee { // int id; // int salary; // public: // void getId(void){ // cout<<"enter the id of the employee"; // cin>>id; // } // void setId(void){ // cout<<"the id of the employee is "<<id<<endl; // } // }; // int main(){ // Employee krishna, shalini, krisha, shana; // Employee ks[4]; //an array which stores data of 4 // for (int i = 0; i<=4; i++) // { // ks[4].getId(); // ks[4].setId(); // } //krishna.getId(); //krishna.setId(); //suppose i have a company named ks and it has 2000 employees and i need to store //id and salary of ...