Class and object simple c++ program which was developed by me.
program:
#include<iostream>
#include<string.h>
using namespace std;
class myclass{
public:
int mynum;
string mystring;
};
int main(){
myclass myobj;
myobj.mynum=25;
myobj.mystring="RAGUL TECHNOLOGY";
cout<<myobj.mynum<<"\n";
cout<<myobj.mystring<<endl;
}
OUTPUT:
25
RAGUL TECHNOLOGY
You can download the code by click here
Post a Comment