Click here to Skip to main content
15,923,376 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to detect process termination Pin
harsha u20-Nov-07 21:55
harsha u20-Nov-07 21:55 
QuestionLoading *.mht files from a stream using CHTMLView Pin
sdancer7519-Nov-07 22:05
sdancer7519-Nov-07 22:05 
QuestionHow to avoid warning LNK4224: /COMMENT is no longer supported Pin
mohindar_kks19-Nov-07 22:02
mohindar_kks19-Nov-07 22:02 
AnswerRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
CPallini19-Nov-07 22:10
mveCPallini19-Nov-07 22:10 
AnswerRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Nelek19-Nov-07 22:24
protectorNelek19-Nov-07 22:24 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Cedric Moonen19-Nov-07 23:13
Cedric Moonen19-Nov-07 23:13 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Nelek19-Nov-07 23:49
protectorNelek19-Nov-07 23:49 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Cedric Moonen20-Nov-07 1:11
Cedric Moonen20-Nov-07 1:11 
I think it is bad because you can miss important warnings (things that you didn't thought about). You should get rid of the warnings instead of silenting them. I only disable them on some rare occasions.

C4181: why do you put the const keyword then ? If it will be ignored ? It let you think that it is used but it isn't so it can lead to confusion. Why don't you just remove it ? This will lead to the same result without warning.

C4018: why do you mix signed and unsigned ? That probably results to a bad design. They don't have the same range so if you start with a signed number, stick to it. On some rare occasion you will need to mix them, but then use an explicit cast.

C4244:

Nelek wrote:
SOLUTION: casting to the correct typ, but dont needed, but in this case I wanna lose the decimals by truncating and the constants must be float/double for other places to be used. And I have about 90 times this warning


Cast the complete block: (int)(4*GWIDTH)



Nelek wrote:
warning C4308: Negative Ganzzahlkonstante in vorzeichenlosen Typ konvertiert
//Conversion of negative integer constant in unsigned type
REASON: file->Seek (-3 * sizeof (BYTE), CFile::current);


That's typically one of the warning you shouldn't neglect, because your code is wrong. The warning tells you that it converts the -3 to an unsigned, so the result won't be what you expect. It does that because sizeof returns an unsigned type and so, when doing the multiplication your compiler will convert the -3 to unsigned type so that it can multiply both operands.


Cédric Moonen
Software developer

Charting control [v1.2]

GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Nelek20-Nov-07 2:24
protectorNelek20-Nov-07 2:24 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
DoomedOne20-Nov-07 7:21
DoomedOne20-Nov-07 7:21 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Nelek20-Nov-07 21:35
protectorNelek20-Nov-07 21:35 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
David Crow20-Nov-07 2:57
David Crow20-Nov-07 2:57 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Nelek20-Nov-07 4:06
protectorNelek20-Nov-07 4:06 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
bob1697220-Nov-07 1:58
bob1697220-Nov-07 1:58 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Nelek20-Nov-07 2:25
protectorNelek20-Nov-07 2:25 
AnswerRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Paresh Chitte19-Nov-07 22:51
Paresh Chitte19-Nov-07 22:51 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Cedric Moonen19-Nov-07 23:14
Cedric Moonen19-Nov-07 23:14 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Paresh Chitte19-Nov-07 23:22
Paresh Chitte19-Nov-07 23:22 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
mohindar_kks20-Nov-07 1:55
mohindar_kks20-Nov-07 1:55 
Questionreaching a database on network Pin
aguest19-Nov-07 21:28
aguest19-Nov-07 21:28 
AnswerRe: reaching a database on network Pin
David Crow20-Nov-07 3:07
David Crow20-Nov-07 3:07 
Questiona link error about template and construction Pin
richardye19-Nov-07 20:47
richardye19-Nov-07 20:47 
AnswerRe: a link error about template and construction Pin
Cedric Moonen19-Nov-07 21:01
Cedric Moonen19-Nov-07 21:01 
AnswerRe: a link error about template and construction Pin
David Crow20-Nov-07 3:18
David Crow20-Nov-07 3:18 
GeneralRe: a link error about template and construction Pin
richardye20-Nov-07 14:01
richardye20-Nov-07 14:01 

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.