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

C / C++ / MFC

 
GeneralAny body can help me! Pin
YunYan2-Sep-04 2:49
YunYan2-Sep-04 2:49 
GeneralRe: Why LoadMenu() Failed! Errorcode=1814 Pin
David Crow2-Sep-04 3:00
David Crow2-Sep-04 3:00 
GeneralWM_QUERYENDSESSION From a dll Pin
AssemblySoft1-Sep-04 23:25
AssemblySoft1-Sep-04 23:25 
Generalpressed button sends message Pin
Tibor Blazko1-Sep-04 22:57
Tibor Blazko1-Sep-04 22:57 
GeneralHelp me!!!!! Pin
Anonymous1-Sep-04 22:44
Anonymous1-Sep-04 22:44 
GeneralSQL_ATTR_CONNECTION_DEAD attribute of MySQL not working as expected Pin
Anonymous1-Sep-04 22:37
Anonymous1-Sep-04 22:37 
GeneralPointer array access outside a class! Pin
CreepingFeature1-Sep-04 22:06
CreepingFeature1-Sep-04 22:06 
GeneralRe: Pointer array access outside a class! Pin
Mike Beckerleg1-Sep-04 22:35
Mike Beckerleg1-Sep-04 22:35 
This is wrong in so many ways.

To answer the last question first - try writing an [] operator for the class to give access to the variables in the class. Then you can do things like boundary checks for the index etc, and you won't be directly exposing private data.

As for the actual code you wrote.

arrayAddress = pointerArray[0];

makes arrayAddress point to number1.

Writing arrayAddress[0] dereferences the pointer to get the value of number1.

Writing arrayAddress[1] dereferences a pointer one integer past the memory location of number1, number2 might be stored there but probably not. You need to check your usage of pointers.
GeneralRe: Pointer array access outside a class! Pin
Anonymous2-Sep-04 2:20
Anonymous2-Sep-04 2:20 
GeneralRe: Pointer array access outside a class! Pin
Mike Beckerleg2-Sep-04 3:09
Mike Beckerleg2-Sep-04 3:09 
GeneralRe: Pointer array access outside a class! Pin
CreepingFeature2-Sep-04 21:00
CreepingFeature2-Sep-04 21:00 
GeneralZIP files programmatically using MFC C++ Pin
anderslundsgard1-Sep-04 20:37
anderslundsgard1-Sep-04 20:37 
GeneralRe: ZIP files programmatically using MFC C++ Pin
PJ Arends1-Sep-04 21:18
professionalPJ Arends1-Sep-04 21:18 
GeneralControlling Device and Internet Pin
zahid_ash1-Sep-04 19:46
zahid_ash1-Sep-04 19:46 
GeneralEdit Box messages Pin
shiraztk1-Sep-04 19:21
shiraztk1-Sep-04 19:21 
GeneralRe: Edit Box messages Pin
Scozturk1-Sep-04 21:45
professionalScozturk1-Sep-04 21:45 
GeneralRe: Edit Box messages Pin
shiraztk1-Sep-04 22:27
shiraztk1-Sep-04 22:27 
GeneralRe: Edit Box messages Pin
wb2-Sep-04 0:52
wb2-Sep-04 0:52 
GeneralRe: Edit Box messages Pin
James R. Twine2-Sep-04 3:48
James R. Twine2-Sep-04 3:48 
GeneralRe: Edit Box messages Pin
shiraztk2-Sep-04 20:16
shiraztk2-Sep-04 20:16 
GeneralMessge routing in SDI/MDI Pin
vikramlinux1-Sep-04 19:02
vikramlinux1-Sep-04 19:02 
Questionanybody has experience of using Nero SDK? Pin
lonely_life1-Sep-04 18:59
lonely_life1-Sep-04 18:59 
Generalscanlogd Pin
Anonymous1-Sep-04 18:58
Anonymous1-Sep-04 18:58 
GeneralOnLButtonDown() question Pin
persian_boi1-Sep-04 17:40
persian_boi1-Sep-04 17:40 
GeneralRe: OnLButtonDown() question Pin
Michael Dunn1-Sep-04 18:00
sitebuilderMichael Dunn1-Sep-04 18:00 

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.