Click here to Skip to main content
16,006,341 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionA real beginner Q Pin
Ray_mond19-Oct-06 10:00
Ray_mond19-Oct-06 10:00 
AnswerRe: A real beginner Q Pin
Zac Howland19-Oct-06 10:14
Zac Howland19-Oct-06 10:14 
AnswerRe: A real beginner Q Pin
Christian Graus19-Oct-06 10:17
protectorChristian Graus19-Oct-06 10:17 
QuestionStruct(ures) pointers - how to initialize? Pin
Vaclav_19-Oct-06 8:47
Vaclav_19-Oct-06 8:47 
AnswerRe: Struct(ures) pointers - how to initialize? Pin
David Crow19-Oct-06 8:50
David Crow19-Oct-06 8:50 
GeneralRe: Struct(ures) pointers - how to initialize? Pin
Vaclav_19-Oct-06 9:14
Vaclav_19-Oct-06 9:14 
GeneralRe: Struct(ures) pointers - how to initialize? Pin
Zac Howland19-Oct-06 9:49
Zac Howland19-Oct-06 9:49 
AnswerRe: Struct(ures) pointers - how to initialize? Pin
Christian Graus19-Oct-06 9:02
protectorChristian Graus19-Oct-06 9:02 
Vaclav_Sal wrote:
pTest->test1 = 0;


Any pointer in your code should be initialised to NULL. If you delete a pointer, set it back to NULL. Otherwise, you get these errors. You can still get errors, you need to remember to check if the value is NULL.

if(pTest)
{
pTest->test1 = 0;
}

is the easiest way to do that. Note this won't work unless any uninitialised value for pTest is guarenteed to be NULL ( by you )

Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog

GeneralRe: Struct(ures) pointers - how to initialize? Pin
Vaclav_19-Oct-06 9:27
Vaclav_19-Oct-06 9:27 
GeneralRe: Struct(ures) pointers - how to initialize? Pin
Vaclav_19-Oct-06 9:35
Vaclav_19-Oct-06 9:35 
GeneralRe: Struct(ures) pointers - how to initialize? Pin
Christian Graus19-Oct-06 9:51
protectorChristian Graus19-Oct-06 9:51 
Questionoverlaying graphics using API Hooks Pin
bayfouinc19-Oct-06 8:43
bayfouinc19-Oct-06 8:43 
AnswerRe: overlaying graphics using API Hooks Pin
Hamid_RT20-Oct-06 6:47
Hamid_RT20-Oct-06 6:47 
GeneralRe: overlaying graphics using API Hooks Pin
bayfouinc20-Oct-06 7:01
bayfouinc20-Oct-06 7:01 
Questionrun msword or other registered files such as PDF files & etc. Pin
asdf175319-Oct-06 8:29
asdf175319-Oct-06 8:29 
AnswerRe: run msword or other registered files such as PDF files & etc. Pin
Christian Graus19-Oct-06 8:28
protectorChristian Graus19-Oct-06 8:28 
GeneralRe: run msword or other registered files such as PDF files & etc. Pin
asdf175319-Oct-06 8:35
asdf175319-Oct-06 8:35 
GeneralRe: run msword or other registered files such as PDF files & etc. Pin
David Crow19-Oct-06 8:38
David Crow19-Oct-06 8:38 
GeneralRe: run msword or other registered files such as PDF files & etc. Pin
asdf175319-Oct-06 8:48
asdf175319-Oct-06 8:48 
GeneralRe: run msword or other registered files such as PDF files & etc. Pin
alphaxz19-Oct-06 20:36
alphaxz19-Oct-06 20:36 
GeneralRe: run msword or other registered files such as PDF files & etc. Pin
Hamid_RT19-Oct-06 20:58
Hamid_RT19-Oct-06 20:58 
GeneralRe: run msword or other registered files such as PDF files & etc. Pin
Hamid_RT19-Oct-06 20:56
Hamid_RT19-Oct-06 20:56 
QuestionBitmap lighting Pin
Waldermort19-Oct-06 6:12
Waldermort19-Oct-06 6:12 
AnswerRe: Bitmap lighting Pin
Christian Graus19-Oct-06 6:20
protectorChristian Graus19-Oct-06 6:20 
GeneralRe: Bitmap lighting Pin
Waldermort19-Oct-06 6:35
Waldermort19-Oct-06 6:35 

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.