Vidyarthiplus (V+) - Indian Students Online Education Forum

Full Version: Week end contest
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I m gng to post one program  .post the output of the corresponding program


#include<iostream.h>
#include<conio.h>
void fun()
{
class stud
{
private:
int b;
public:
void get()
{
int b;
b=10;
}
void display()
{
cout<<"b="<<b;
}
}};
void main()
{
stud o1;
o1.get();
01.display();
getch();
}
                               Al the very best


         "For winners one reputation is to be added"
It has 2 errors...IT cannot be run because class inside te function can not be call in outside....
wel wel.. u r too good in oops
Pages: 1 2