Click here to Skip to main content
15,889,874 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
Vaclav_Sal wrote:
the elements initialization works fine and I have set the pointer to NULL
in the default constructor and it still gives me "Access violation".


If a pointer is null, you can't use it, you need to use the code I gave you to deal with this. So, use new if you want to use it. You can also lazy initialize ( call new when you need it and not before ).

Don't forget to call delete in your destructor


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

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 
GeneralRe: Bitmap lighting Pin
Christian Graus19-Oct-06 7:18
protectorChristian Graus19-Oct-06 7:18 
AnswerRe: Bitmap lighting Pin
Mark Salsbery19-Oct-06 6:26
Mark Salsbery19-Oct-06 6:26 
GeneralRe: Bitmap lighting Pin
Waldermort19-Oct-06 6:31
Waldermort19-Oct-06 6:31 

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.