Click here to Skip to main content
15,899,124 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: stuck with a trivia Pin
Smith#3-Feb-09 22:20
Smith#3-Feb-09 22:20 
AnswerRe: stuck with a trivia Pin
Stuart Dootson3-Feb-09 21:12
professionalStuart Dootson3-Feb-09 21:12 
GeneralRe: stuck with a trivia [modified] Pin
Smith#3-Feb-09 21:24
Smith#3-Feb-09 21:24 
GeneralRe: stuck with a trivia Pin
Stuart Dootson3-Feb-09 22:01
professionalStuart Dootson3-Feb-09 22:01 
GeneralRe: stuck with a trivia Pin
Smith#3-Feb-09 22:14
Smith#3-Feb-09 22:14 
GeneralRe: stuck with a trivia Pin
Smith#3-Feb-09 22:18
Smith#3-Feb-09 22:18 
AnswerRe: stuck with a trivia Pin
Emilio Garavaglia3-Feb-09 23:13
Emilio Garavaglia3-Feb-09 23:13 
GeneralRe: stuck with a trivia Pin
Smith#4-Feb-09 7:44
Smith#4-Feb-09 7:44 
As you know pointers & arrays both move consecutive. Then how come it be totally different? To some extent I can agree. Because the next pointer in the **ptr can be made to point to some other *p pointing somewhere. But here that's not the case.. it's array, quite consecutive and we are making our **ptr point to it. What do you think about the below approach ? getting the address of the first row pointer & getting the address of it and then deferencing.
<br />
int py2[2][2] = {10,11,12,13};<br />
<br />
int* sptr = &py2[0][0];<br />
int** dptr = &sptr; <br />
<br />
printf("\nAtlast:%d\n",**dptr); <br />
*dptr+=1;<br />
*dptr+=2;<br />
printf("\nAtlast:%d\n",**dptr);<br />


Beer | [beer]

GeneralRe: stuck with a trivia [modified] Pin
Emilio Garavaglia4-Feb-09 21:32
Emilio Garavaglia4-Feb-09 21:32 
GeneralRe: stuck with a trivia Pin
Smith#7-Feb-09 16:13
Smith#7-Feb-09 16:13 
GeneralRe: stuck with a trivia Pin
Emilio Garavaglia4-Feb-09 21:52
Emilio Garavaglia4-Feb-09 21:52 
Questionfatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h></windows.h> [modified] Pin
Kiran Pinjala3-Feb-09 19:38
Kiran Pinjala3-Feb-09 19:38 
AnswerRe: fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include Pin
SandipG 3-Feb-09 20:49
SandipG 3-Feb-09 20:49 
GeneralRe: fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include Pin
Kiran Pinjala3-Feb-09 21:32
Kiran Pinjala3-Feb-09 21:32 
AnswerRe: fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include Pin
«_Superman_»3-Feb-09 20:59
professional«_Superman_»3-Feb-09 20:59 
GeneralRe: fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include Pin
Kiran Pinjala3-Feb-09 21:34
Kiran Pinjala3-Feb-09 21:34 
GeneralRe: fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include Pin
Smith#3-Feb-09 21:44
Smith#3-Feb-09 21:44 
GeneralRe: fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include Pin
Kiran Pinjala3-Feb-09 22:24
Kiran Pinjala3-Feb-09 22:24 
QuestionRe: fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include Pin
David Crow4-Feb-09 3:32
David Crow4-Feb-09 3:32 
QuestiontimeSetEvent only in Windows XP? Pin
nm_1143-Feb-09 19:25
nm_1143-Feb-09 19:25 
AnswerRe: timeSetEvent only in Windows XP? Pin
Stuart Dootson3-Feb-09 21:14
professionalStuart Dootson3-Feb-09 21:14 
QuestionEnsuring DialogBox is fully initialized Pin
prashantbhatia0073-Feb-09 19:03
prashantbhatia0073-Feb-09 19:03 
AnswerRe: Ensuring DialogBox is fully initialized Pin
SandipG 3-Feb-09 20:51
SandipG 3-Feb-09 20:51 
AnswerRe: Ensuring DialogBox is fully initialized Pin
prasad_som4-Feb-09 0:48
prasad_som4-Feb-09 0:48 
AnswerRe: Ensuring DialogBox is fully initialized Pin
Iain Clarke, Warrior Programmer4-Feb-09 1:28
Iain Clarke, Warrior Programmer4-Feb-09 1:28 

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.