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

C / C++ / MFC

 
GeneralHelp!!! MFC ActiveX control problem Pin
28-Dec-00 5:41
suss28-Dec-00 5:41 
GeneralMFC CString 4.0 vs MFC CString 6.0 Pin
28-Dec-00 4:27
suss28-Dec-00 4:27 
GeneralRe: MFC CString 4.0 vs MFC CString 6.0 Pin
Erik Funkenbusch28-Dec-00 13:02
Erik Funkenbusch28-Dec-00 13:02 
GeneralMissing messages Pin
28-Dec-00 1:40
suss28-Dec-00 1:40 
GeneralAnyone knows how to write into Output toolbar (something like TRACE does only in some other tab like Result) of MSVC++ Pin
27-Dec-00 21:30
suss27-Dec-00 21:30 
GeneralRe: Anyone knows how to write into Output toolbar (something like TRACE does only in some other tab like Result) of MSVC++ Pin
J Patel3-Jan-01 5:43
J Patel3-Jan-01 5:43 
QuestionWhat are pointers for??? Pin
27-Dec-00 15:09
suss27-Dec-00 15:09 
AnswerRe: What are pointers for??? Pin
Tim Deveaux28-Dec-00 4:21
Tim Deveaux28-Dec-00 4:21 
I'll try a stab at the first part...

I've always thought its helpful to understand how the processor accesses memory in order to understand pointers.

Consider that a lot of what a cpu does consists in getting some value from memory into its registers, or copying some values from one place to another. Most instructions have a series of 'modes' depending on whether they will operate reg to reg, immediate to reg, or mem to reg etc.

For example:
mov         cx,word ptr [ebx+6]

gets the two bytes at the memory address pointed to by 'the number in the ebx register plus 6', and moves it into the cx register.

Because the C language was designed to be 'close to the metal' it seemed like a good idea to allow for a construct that would mimic this kind of addessing. In C, the above assembly would be:
cx = *(ebx+6);

...er ... assuming a bit of setup to map the registers...

Anyway, you can easily extend this to more 'indirect' addressing where you get the value 'pointed at by the pointer at this address' etc. And you can write therewith some honking fast code.
HTH
AnswerRe: What are pointers for??? Pin
Alvaro Mendez28-Dec-00 5:23
Alvaro Mendez28-Dec-00 5:23 
AnswerRe: What are pointers for??? Pin
Erik Funkenbusch28-Dec-00 13:09
Erik Funkenbusch28-Dec-00 13:09 
AnswerRe: What are pointers for??? Pin
29-Dec-00 0:02
suss29-Dec-00 0:02 
Generalat the risk of getting boring... Pin
l a u r e n27-Dec-00 4:46
l a u r e n27-Dec-00 4:46 
GeneralAceesing Structure From VC++\VB client To VC++ server Pin
27-Dec-00 2:44
suss27-Dec-00 2:44 
GeneralRe: Aceesing Structure From VC++\VB client To VC++ server Pin
l a u r e n27-Dec-00 4:48
l a u r e n27-Dec-00 4:48 
GeneralCListCtrl Questions - Again... Pin
#realJSOP27-Dec-00 1:47
professional#realJSOP27-Dec-00 1:47 
GeneralRe: CListCtrl Questions - Again... Pin
Alberto Bar-Noy27-Dec-00 2:05
Alberto Bar-Noy27-Dec-00 2:05 
GeneralRe: CListCtrl Questions - Again... Pin
l a u r e n27-Dec-00 4:52
l a u r e n27-Dec-00 4:52 
Questionhow can convert CEditView to CRichEditView? Pin
kykim26-Dec-00 20:28
kykim26-Dec-00 20:28 
GeneralAvi animatectl Pin
26-Dec-00 12:30
suss26-Dec-00 12:30 
GeneralRe: Avi animatectl Pin
Masoud Samimi26-Dec-00 13:15
Masoud Samimi26-Dec-00 13:15 
GeneralRe: Avi animatectl Pin
26-Dec-00 14:13
suss26-Dec-00 14:13 
GeneralRe: Avi animatectl Pin
Masoud Samimi27-Dec-00 18:16
Masoud Samimi27-Dec-00 18:16 
GeneralRe: Avi animatectl Pin
28-Dec-00 2:09
suss28-Dec-00 2:09 
GeneralRe: Avi animatectl Pin
Masoud Samimi28-Dec-00 2:29
Masoud Samimi28-Dec-00 2:29 
GeneralRe: Avi animatectl Pin
28-Dec-00 3:44
suss28-Dec-00 3:44 

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.