0
What's the problem with this program??
#include <iostream> using namespace std; class Employee { private: int a, b, c; public: int d , e; void setData(int a1,int b1,int c1); int getData(){ cout<<"the value of a is "<<a<<endl; cout<<"the value of b is "<<b<<endl; cout<<"the value of c is "<<c<<endl; cout<<"the value of d is "<<d<<endl; cout<<"the value of e is "<<e<<endl; } void Employee :: setdata(int a1,int b1,int c1){ a=a1; b=b1; c=c1; } }; int main() { Employee haram; haram.setData(1,2,3); haram.getData(); return 0; }
1 Answer
0
class Employee
{
    private:
    int a, b, c;
    public:
    int d, e;
    void setData(int a1,int b1,int c1){
        a=a1;
        b=b1;
        c=c1;
    }
    void getData(){
        cout<<"the value of a is "<<a<<endl;
        cout<<"the value of b is "<<b<<endl;
        cout<<"the value of c is "<<c<<endl;
        cout<<"the value of d is "<<d<<endl;          
        cout<<"the value of e is "<<e<<endl;
    }
};





