Click here to Skip to main content
15,897,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CRichEditCtrl - memory issue Pin
pubududilena12-Nov-04 19:54
pubududilena12-Nov-04 19:54 
GeneralRe: CRichEditCtrl - memory issue Pin
ciprian0016-Nov-04 6:35
ciprian0016-Nov-04 6:35 
GeneralMFC application Pin
Bakhi Vasiev12-Nov-04 8:13
sussBakhi Vasiev12-Nov-04 8:13 
GeneralRe: MFC application Pin
pubududilena12-Nov-04 20:43
pubududilena12-Nov-04 20:43 
GeneralRe: MFC application Pin
Bakhti15-Nov-04 1:25
Bakhti15-Nov-04 1:25 
Generalbyte array Pin
Anonymous12-Nov-04 7:57
Anonymous12-Nov-04 7:57 
GeneralRe: byte array Pin
Budric B.12-Nov-04 8:15
Budric B.12-Nov-04 8:15 
GeneralInheritance Pin
0v3rloader12-Nov-04 7:03
0v3rloader12-Nov-04 7:03 
Hello,

I have been having this compiling issue today and I don't really know what I am doing wrong.

Nothing better than an example to make myself understood thus consider the following example:

class objA
{
public:
	objA(){};
	~objA(){};

public:
	virtual bool Setup(int){};
	bool Setup(float){};
};


class objB : public objA
{
public:
	objB(){};
	~objB(){};

public:
	virtual bool Setup(int){};
};


class C
{
public:
	C(){};
	~C(){};

public:
	bool doTest()
	{
		objB	b;

		b.Setup(100);	
		b.Setup(0.0001); // warning C4244: 'argument' : 
				 // conversion from 'const double' to 'int', possible loss of data
	};
};


Why am I getting this warning? I mean, shouldn't the compiler automatically use the float-version method, or are there any rules I am aware of?

Any insights as to why this is happening will be greatly appreciated.

Thanks,

David
GeneralRe: Inheritance Pin
Budric B.12-Nov-04 8:00
Budric B.12-Nov-04 8:00 
GeneralRe: Inheritance Pin
Chris Meech12-Nov-04 8:48
Chris Meech12-Nov-04 8:48 
GeneralDatabase Day/Month switching to Month/Day Pin
DRHuff12-Nov-04 6:59
DRHuff12-Nov-04 6:59 
GeneralRe: Database Day/Month switching to Month/Day Pin
Chris Meech12-Nov-04 8:42
Chris Meech12-Nov-04 8:42 
QuestionMy stack is corrupted?!? Pin
Nathan Addy12-Nov-04 5:09
Nathan Addy12-Nov-04 5:09 
AnswerRe: My stack is corrupted?!? Pin
John M. Drescher12-Nov-04 5:27
John M. Drescher12-Nov-04 5:27 
GeneralRe: My stack is corrupted?!? Pin
Nathan Addy12-Nov-04 5:34
Nathan Addy12-Nov-04 5:34 
AnswerRe: My stack is corrupted?!? Pin
Joaquín M López Muñoz12-Nov-04 5:30
Joaquín M López Muñoz12-Nov-04 5:30 
Questionhow to backup database non remote computer? Pin
venadder12-Nov-04 5:02
venadder12-Nov-04 5:02 
AnswerRe: how to backup database non remote computer? Pin
John M. Drescher12-Nov-04 5:11
John M. Drescher12-Nov-04 5:11 
GeneralRe: how to backup database non remote computer? Pin
venadder12-Nov-04 5:37
venadder12-Nov-04 5:37 
GeneralRe: how to backup database non remote computer? Pin
John M. Drescher12-Nov-04 5:55
John M. Drescher12-Nov-04 5:55 
GeneralRe: how to backup database non remote computer? Pin
venadder12-Nov-04 6:24
venadder12-Nov-04 6:24 
GeneralRe: how to backup database non remote computer? Pin
John M. Drescher12-Nov-04 6:46
John M. Drescher12-Nov-04 6:46 
GeneralRe: how to backup database non remote computer? Pin
venadder12-Nov-04 7:03
venadder12-Nov-04 7:03 
GeneralRe: how to backup database non remote computer? Pin
John M. Drescher12-Nov-04 7:09
John M. Drescher12-Nov-04 7:09 
QuestionHow To Create Sys Env Var Programmatically? Pin
Spoodles12-Nov-04 4:58
Spoodles12-Nov-04 4:58 

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.