Click here to Skip to main content
16,005,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: type casting Pin
Waldermort2-Nov-06 6:05
Waldermort2-Nov-06 6:05 
GeneralRe: type casting Pin
Maximilien2-Nov-06 7:18
Maximilien2-Nov-06 7:18 
GeneralRe: type casting Pin
Waldermort2-Nov-06 9:18
Waldermort2-Nov-06 9:18 
GeneralRe: type casting Pin
PJ Arends2-Nov-06 7:28
professionalPJ Arends2-Nov-06 7:28 
GeneralRe: type casting [modified] Pin
Waldermort2-Nov-06 9:21
Waldermort2-Nov-06 9:21 
GeneralRe: type casting Pin
Michael Dunn2-Nov-06 8:53
sitebuilderMichael Dunn2-Nov-06 8:53 
GeneralRe: type casting Pin
Waldermort2-Nov-06 9:38
Waldermort2-Nov-06 9:38 
GeneralRe: type casting Pin
Maximilien2-Nov-06 9:52
Maximilien2-Nov-06 9:52 
waldermort wrote:
But there is no way to detect garbage.


you are the one who do the coding, you have to make sure there is no garbage that is introduced to the system.

If there are places in your code that can generate garbage, fix them.

in your example, the CImage class must be instantiated somewhere, if you cannot validate the construction of your own object, you have a problem with your design.

remember that C++ is quite "type" safe; and with the compiler warnings set to level 4 you should be able to resolve all of these without having to do dark magick incantations on your pointers.

and try to never do C type casting on C++ objects, use static_cast<CImage*>(pointer) instead of (CImage*)pointer




Maximilien Lincourt
Your Head A Splode - Strong Bad

GeneralRe: type casting Pin
Waldermort2-Nov-06 17:39
Waldermort2-Nov-06 17:39 
GeneralRe: type casting Pin
Michael Dunn2-Nov-06 10:05
sitebuilderMichael Dunn2-Nov-06 10:05 
AnswerRe: type casting Pin
Nemanja Trifunovic2-Nov-06 7:23
Nemanja Trifunovic2-Nov-06 7:23 
QuestionListview using WIN32 API Pin
priyank_ldce2-Nov-06 5:11
priyank_ldce2-Nov-06 5:11 
AnswerRe: Listview using WIN32 API Pin
David Crow2-Nov-06 5:40
David Crow2-Nov-06 5:40 
GeneralRe: Listview using WIN32 API Pin
priyank_ldce2-Nov-06 5:50
priyank_ldce2-Nov-06 5:50 
GeneralRe: Listview using WIN32 API Pin
David Crow2-Nov-06 6:04
David Crow2-Nov-06 6:04 
GeneralRe: Listview using WIN32 API Pin
led mike2-Nov-06 6:50
led mike2-Nov-06 6:50 
GeneralRe: Listview using WIN32 API Pin
David Crow2-Nov-06 8:12
David Crow2-Nov-06 8:12 
AnswerRe: Listview using WIN32 API Pin
Michael Dunn2-Nov-06 8:55
sitebuilderMichael Dunn2-Nov-06 8:55 
QuestionBit alignment Problem with VS 2005 Maybe Pin
Andy2022-Nov-06 4:44
Andy2022-Nov-06 4:44 
AnswerRe: Bit alignment Problem with VS 2005 Maybe Pin
Waldermort2-Nov-06 4:56
Waldermort2-Nov-06 4:56 
GeneralRe: Bit alignment Problem with VS 2005 Maybe Pin
Andy2022-Nov-06 5:20
Andy2022-Nov-06 5:20 
GeneralRe: Bit alignment Problem with VS 2005 Maybe Pin
Mark Salsbery2-Nov-06 8:04
Mark Salsbery2-Nov-06 8:04 
GeneralRe: Bit alignment Problem with VS 2005 Maybe Pin
Andy2022-Nov-06 22:29
Andy2022-Nov-06 22:29 
QuestionReally need your help(someting aobut the directions which shoule I choose!!) Pin
wanlim08172-Nov-06 4:42
wanlim08172-Nov-06 4:42 
AnswerRe: Really need your help(someting aobut the directions which shoule I choose!!) Pin
David Crow2-Nov-06 4:49
David Crow2-Nov-06 4:49 

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.