How to create a class in cpp?
How to create a class in cpp? #include<iostream> using namespace std; class myclass{ public: int name(int a,int b); //this is function }; int myclass::name(int a,int b) //This is a member function { if(a>b){ cout <<a; } else { cout<<b; } return 0; } int main() { myclass obj; // myclass object is obj obj.name(30,50); //a=30,b=50 … Read more