Why is the compiler giving an error???
#include <iostream> using namespace std; class Human { int cnic; int age; public: int setdata(int ,int );/*{ a= cnic; b=age; }*/ void getdata(){ cout<<"My CNIC is "<<cnic<<endl; cout<<"My age is "<<age<< endl; } }; int Human::setdata(int a,int b){ a= cnic; b=age; } class student :public Human{ int rollno; int section; public: int setdata(int x ,int y){ x=rollno; y=section; } void getdata(){ cout<<"My roll no. is "<<rollno<<endl; cout<<"My section is "<<section<<endl; } }; class Employee :public Human{ string name; int id; public : int setdata(string ,int );/*{ o1=name; o2=id; }*/ void getdata(){ cout<< "Employee ID is "<<id <<endl; cout<<"Employee name is "<<name<<endl; } }; int Employee ::setdata(string o1 ,int o2){ o1=name; o2=id; } int main() { Human h; h.setdata(123,34); h.getdata(); return 0;