Calling base class memeber function in child class member function
-
Hi eveeryone, Can someone please look at my code and teach me where i am making mistake.
void Laptop::show()
{ Computer::show();
cout<<"weight is="<#include
#include
class Computer
{
protected:
int wordSize;
int memorySize;
int storageSize;
int speed;
public:
Computer(){}
Computer(int,int,int,int);
void show();
};
class Laptop
{
private:
int width;
int height;
int length;
int weight;public:
Laptop(){}
Laptop(int,int,int,int,int,int,int,int);
void show();
};
Computer::Computer(int wdSize, int memSize, int storSize ,int spee)
{
wordSize=wdSize;
memorySize=memSize;
storageSize=storSize;
speed=spee;
}
void Computer::show()
{
cout<<"Word Size :"< -
Hi eveeryone, Can someone please look at my code and teach me where i am making mistake.
void Laptop::show()
{ Computer::show();
cout<<"weight is="<#include
#include
class Computer
{
protected:
int wordSize;
int memorySize;
int storageSize;
int speed;
public:
Computer(){}
Computer(int,int,int,int);
void show();
};
class Laptop
{
private:
int width;
int height;
int length;
int weight;public:
Laptop(){}
Laptop(int,int,int,int,int,int,int,int);
void show();
};
Computer::Computer(int wdSize, int memSize, int storSize ,int spee)
{
wordSize=wdSize;
memorySize=memSize;
storageSize=storSize;
speed=spee;
}
void Computer::show()
{
cout<<"Word Size :"<