Click here to Skip to main content
14,697,464 members
Home » Discussions » ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionQuestion about Direct3D View Area Pin
Member 112032772-Feb-16 6:24
MemberMember 112032772-Feb-16 6:24 
QuestionFormatMessage for unicode Pin
bkelly1330-Jan-16 16:03
Memberbkelly1330-Jan-16 16:03 
AnswerRe: FormatMessage for unicode Pin
Richard MacCutchan30-Jan-16 22:15
mveRichard MacCutchan30-Jan-16 22:15 
QuestionWCHAR argument pointer Resolved Pin
bkelly1314-Jan-16 17:07
Memberbkelly1314-Jan-16 17:07 
AnswerRe: WCHAR argument pointer Pin
Richard Andrew x6414-Jan-16 17:38
professionalRichard Andrew x6414-Jan-16 17:38 
GeneralRe: WCHAR argument pointer Pin
bkelly1315-Jan-16 12:58
Memberbkelly1315-Jan-16 12:58 
QuestionScrolling ATL Dialog with mouse wheel problem. Pin
Member 1213702619-Dec-15 19:11
MemberMember 1213702619-Dec-15 19:11 
AnswerRe: Scrolling ATL Dialog with mouse wheel problem. Pin
Richard MacCutchan19-Dec-15 22:07
mveRichard MacCutchan19-Dec-15 22:07 
QuestionCoCreateInstance(CLSID_SpVoice); fails with Class not registered Pin
ptr_Electron14-Dec-15 1:56
Memberptr_Electron14-Dec-15 1:56 
AnswerRe: CoCreateInstance(CLSID_SpVoice); fails with Class not registered Pin
Jochen Arndt14-Dec-15 2:39
professionalJochen Arndt14-Dec-15 2:39 
GeneralRe: CoCreateInstance(CLSID_SpVoice); fails with Class not registered Pin
ptr_Electron14-Dec-15 2:52
Memberptr_Electron14-Dec-15 2:52 
GeneralRe: CoCreateInstance(CLSID_SpVoice); fails with Class not registered Pin
Jochen Arndt14-Dec-15 3:13
professionalJochen Arndt14-Dec-15 3:13 
Questionfind crash location in the code Pin
bkelly1313-Dec-15 16:58
Memberbkelly1313-Dec-15 16:58 
AnswerRe: find crash location in the code Pin
Richard Andrew x6413-Dec-15 17:14
professionalRichard Andrew x6413-Dec-15 17:14 
AnswerRe: find crash location in the code Pin
Richard Andrew x6414-Dec-15 10:37
professionalRichard Andrew x6414-Dec-15 10:37 
Questionhow to determine max TCP/IP send size Pin
bkelly1313-Dec-15 16:51
Memberbkelly1313-Dec-15 16:51 
AnswerRe: how to determine max TCP/IP send size Pin
Richard MacCutchan13-Dec-15 22:11
mveRichard MacCutchan13-Dec-15 22:11 
GeneralRe: how to determine max TCP/IP send size Pin
bkelly1318-Dec-15 16:39
Memberbkelly1318-Dec-15 16:39 
GeneralRe: how to determine max TCP/IP send size Pin
Richard MacCutchan18-Dec-15 22:47
mveRichard MacCutchan18-Dec-15 22:47 
AnswerRe: how to determine max TCP/IP send size Pin
Albert Holguin17-Feb-16 10:41
professionalAlbert Holguin17-Feb-16 10:41 
QuestionCFolderPickerDialog can't be inherited Pin
Prasanth.outofboxt6-Dec-15 23:59
MemberPrasanth.outofboxt6-Dec-15 23:59 
SuggestionRe: CFolderPickerDialog can't be inherited Pin
Jochen Arndt7-Dec-15 2:00
professionalJochen Arndt7-Dec-15 2:00 
QuestionBuilding Graphical Menu Choices Pin
Tino Debelo16-Nov-15 15:07
MemberTino Debelo16-Nov-15 15:07 
QuestionRe: Building Graphical Menu Choices Pin
Richard MacCutchan16-Nov-15 21:57
mveRichard MacCutchan16-Nov-15 21:57 
QuestionCalling base class memeber function in child class member function Pin
Member 121160915-Nov-15 1:50
MemberMember 121160915-Nov-15 1:50 
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="<<weight<<endl;
	cout<<"height is ="<<height<<endl;
	cout<<"length is ="<<length<<endl;
	cout<<"width is ="<<width<<endl;	
	

}

//In this function Laptop::show is a child class fucntion which is calling Computer::show(); a base class function.but compiler gives error to use .or -> so function Computer::show(); is not called.
Orignal code is given below:

#include<iostream.h>
#include<conio.h>
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 :"<<wordSize<<endl;
	cout<<"Memory Size: "<<memorySize<<endl;
	cout<<"Storage Size"<<storageSize<<endl;
	cout<<"Speed :"<<speed;
}
Laptop::Laptop(int wdSize, int memSize,int storSize, int spee,int wid, int hei , int len , int wait ):Computer(wdSize,memSize,storSize,spee);

	{
		
	width=wid;
	length=len;
	height=hei;
	weight=wait;	
} 
void Laptop::show()
{	Computer::show();
	cout<<"weight is="<<weight<<endl;
	cout<<"height is ="<<height<<endl;
	cout<<"length is ="<<length<<endl;
	cout<<"width is ="<<width<<endl;	
	

}
void main()
{
	clrscr();
	Computer comp(4,512,20,2);
	Laptop lap(8,1024,50,2,15,19,14,2);
	cout<<"Computer Specifications are"<<endl;
	comp.show();
	cout<<":Laptop specifications are"<<endl;
	lap.show();
	getch();
}

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.