Click here to Skip to main content
15,798,825 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Pointer indirection Pin
Mircea Neacsu14-Sep-23 4:06
Mircea Neacsu14-Sep-23 4:06 
GeneralRe: Pointer indirection Pin
Calin Negru14-Sep-23 5:13
Calin Negru14-Sep-23 5:13 
GeneralRe: Pointer indirection Pin
Mircea Neacsu14-Sep-23 5:31
Mircea Neacsu14-Sep-23 5:31 
GeneralRe: Pointer indirection Pin
Calin Negru14-Sep-23 10:40
Calin Negru14-Sep-23 10:40 
GeneralRe: Pointer indirection Pin
jschell14-Sep-23 11:50
jschell14-Sep-23 11:50 
GeneralRe: Pointer indirection Pin
Calin Negru14-Sep-23 21:55
Calin Negru14-Sep-23 21:55 
GeneralRe: Pointer indirection Pin
k505414-Sep-23 5:32
mvek505414-Sep-23 5:32 
AnswerRe: Pointer indirection Pin
Richard MacCutchan14-Sep-23 6:43
mveRichard MacCutchan14-Sep-23 6:43 
C++
int Strawberry = 10;
int * PointerInd0 = &Strawberry;
std::cout << "*PointerInd0: " << *PointerInd0 << std::endl;
int ** PointerInd1 = &PointerInd0;
std::cout << "**PointerInd1: " << **PointerInd1 << std::endl;
// I’m not sure what comes next
int *** PointerInd2 = &PointerInd1;
std::cout << "***PointerInd2: " << ***PointerInd2 << std::endl;
int **** PointerInd3 = &PointerInd2;
std::cout << "****PointerInd3: " << ****PointerInd3 << std::endl;

Results:
*PointerInd0: 10
**PointerInd1: 10
***PointerInd2: 10
****PointerInd3: 10

And so until the compiler or the application gives up. If you are really interested then get an assembly listing and see what the machine code is doing.
GeneralRe: Pointer indirection Pin
Calin Negru14-Sep-23 10:10
Calin Negru14-Sep-23 10:10 
GeneralRe: Pointer indirection Pin
Richard MacCutchan14-Sep-23 22:12
mveRichard MacCutchan14-Sep-23 22:12 
Question[edited] collision response in a RTS Pin
Calin Negru28-Aug-23 7:49
Calin Negru28-Aug-23 7:49 
AnswerRe: [edited] collision response in a RTS Pin
Randor 28-Aug-23 9:48
professional Randor 28-Aug-23 9:48 
GeneralRe: [edited] collision response in a RTS Pin
Calin Negru29-Aug-23 1:41
Calin Negru29-Aug-23 1:41 
GeneralRe: [edited] collision response in a RTS Pin
Randor 29-Aug-23 6:24
professional Randor 29-Aug-23 6:24 
AnswerRe: [edited] collision response in a RTS Pin
Gerry Schmitz30-Aug-23 11:52
mveGerry Schmitz30-Aug-23 11:52 
GeneralRe: [edited] collision response in a RTS Pin
Calin Negru31-Aug-23 7:05
Calin Negru31-Aug-23 7:05 
GeneralRe: [edited] collision response in a RTS Pin
Gerry Schmitz1-Sep-23 7:26
mveGerry Schmitz1-Sep-23 7:26 
GeneralRe: [edited] collision response in a RTS Pin
Calin Negru2-Sep-23 8:35
Calin Negru2-Sep-23 8:35 
GeneralRe: [edited] collision response in a RTS Pin
Gerry Schmitz3-Sep-23 6:30
mveGerry Schmitz3-Sep-23 6:30 
QuestionDSA Pin
ZAID razvi25-Aug-23 1:50
ZAID razvi25-Aug-23 1:50 
AnswerRe: DSA Pin
CPallini25-Aug-23 2:36
mveCPallini25-Aug-23 2:36 
GeneralRe: DSA Pin
ZAID razvi25-Aug-23 2:54
ZAID razvi25-Aug-23 2:54 
GeneralRe: DSA Pin
CPallini25-Aug-23 3:10
mveCPallini25-Aug-23 3:10 
GeneralRe: DSA Pin
ZAID razvi25-Aug-23 5:57
ZAID razvi25-Aug-23 5:57 
GeneralRe: DSA Pin
Richard Deeming28-Aug-23 22:34
mveRichard Deeming28-Aug-23 22:34 

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.