Source Code
#include "iostream"
using namespace std;
class simple
{
int a;
public:
void set_a();
void get_a();
}m1,m2,m3;
void simple::set_a()
{
a=4;
}
void simple::get_a()
{
cout<<"\n a is "<<a;
}
int main()
{
m2.get_a();
m2.set_a();
m2.get_a();
return 0;
}
0 comments:
Post a Comment