This Program is Scope Resolution Operator (::) in C++ Programming

#include<iostream.h>
#include<conio.h>

class first
{
   private:
         int a,b;
   public:
         void getdata();
         void putdata();
};
void first :: getdata()
{
   cout<<"\nEnter Value of A=>";
   cin>>a;
   cout<<"\nEnter Value of B=>";
   cin>>b;
}
void first :: putdata()
{
  cout<<"\nThe Value of A=>"<<a<<endl;
  cout<<"\nThe Value of B=>"<<b<<endl;
}
void main()
{
  clrscr();
  first a1;
  a1.getdata();
  a1.putdata();
  getch();
}
This Program is Scope Resolution Operator (::) in C++ Programming This Program is Scope Resolution Operator (::) in C++ Programming Reviewed by Unknown on 6:01:00 PM Rating: 5

No comments:

Powered by Blogger.