Guest_imported
New member
- Jan 1, 1970
- 0
Hi!!!!,I’m a new in the world of programming(C++)…I want to know about..what the meaning and the function of :-
Class base{
1)Private
2)public:
void getdata();
void display();
3)class derivedB
ublic base and what the different with
symbol ::
4)and the meaning in void main()
{
base*ptr;
derivedB object;
ptr=&object;
ptr->getdata();
ptr->display();
getch();
This is my program:-
#include<iostream.h>
#include<conio.h>
class base{
private:
int x;
int y;
public:
void getdata();
void display();
};
class derivedB
ublic base{
private:
int rollno;
char name[20];
public:
void getdata();
void displaydata();
};
void base::getdata()
{
cout<<
Class base{
1)Private
2)public:
void getdata();
void display();
3)class derivedB
symbol ::
4)and the meaning in void main()
{
base*ptr;
derivedB object;
ptr=&object;
ptr->getdata();
ptr->display();
getch();
This is my program:-
#include<iostream.h>
#include<conio.h>
class base{
private:
int x;
int y;
public:
void getdata();
void display();
};
class derivedB
private:
int rollno;
char name[20];
public:
void getdata();
void displaydata();
};
void base::getdata()
{
cout<<