How to acces private member function in C++/CPP
Program to show accessibility of private member function.
//private member function(skeleton) can be accessed using
//member function only and not by object and dot operator
#include<iostream>
using namespace std;
class item
{
private:
int number;
float price;
void getdata(int a, float b) // here member function getdata
//is private so not accessible by object
Program to show accessibility of private member function.
//private member function(skeleton) can be accessed using
//member function only and not by object and dot operator
#include<iostream>
using namespace std;
class item
{
private:
int number;
float price;
void getdata(int a, float b) // here member function getdata
//is private so not accessible by object