Click here to Skip to main content
15,886,799 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: problem in vc++ project Pin
David Crow4-Feb-09 3:24
David Crow4-Feb-09 3:24 
Questionstrcpy Pin
hrishiS3-Feb-09 21:25
hrishiS3-Feb-09 21:25 
AnswerRe: strcpy Pin
Smith#3-Feb-09 21:53
Smith#3-Feb-09 21:53 
GeneralRe: strcpy Pin
hrishiS3-Feb-09 22:37
hrishiS3-Feb-09 22:37 
Questiondisplying of latest data from an XML on the list control. [modified] Pin
brucewayn3-Feb-09 20:54
brucewayn3-Feb-09 20:54 
AnswerRe: displying of latest data from an XML on the list control. Pin
Stuart Dootson3-Feb-09 21:23
professionalStuart Dootson3-Feb-09 21:23 
Questionstuck with a trivia Pin
Smith#3-Feb-09 20:39
Smith#3-Feb-09 20:39 
AnswerRe: stuck with a trivia Pin
cmk3-Feb-09 21:04
cmk3-Feb-09 21:04 
All index [] notation is converted to pointer arithmetic.

So, you declare
int py2[2][2];
the compiler knows the total size (2*2 = 4) and how wide each row is (2).

So if you do
py2[1][0]
the compiler can convert to
py2 + (1*2) + 0

But then you do
int **pyp2 = py2;
Now you have created an alias and lost all information about the dimensions of the array.

So, when you try to do
pyp2[0][0]
the compiler can only get to
pyp2 + (0*?) + 0
it doesn't know what to fill in for ?

...cmk

The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack

GeneralRe: stuck with a trivia Pin
Smith#3-Feb-09 21:19
Smith#3-Feb-09 21:19 
AnswerRe: stuck with a trivia Pin
«_Superman_»3-Feb-09 21:10
professional«_Superman_»3-Feb-09 21:10 
GeneralRe: stuck with a trivia Pin
Smith#3-Feb-09 21:25
Smith#3-Feb-09 21:25 
GeneralRe: stuck with a trivia Pin
«_Superman_»3-Feb-09 21:27
professional«_Superman_»3-Feb-09 21:27 
GeneralRe: stuck with a trivia Pin
Smith#3-Feb-09 21:42
Smith#3-Feb-09 21:42 
GeneralRe: stuck with a trivia Pin
«_Superman_»3-Feb-09 21:52
professional«_Superman_»3-Feb-09 21:52 
GeneralRe: stuck with a trivia Pin
Smith#3-Feb-09 21:58
Smith#3-Feb-09 21:58 
GeneralRe: stuck with a trivia Pin
«_Superman_»3-Feb-09 22:03
professional«_Superman_»3-Feb-09 22:03 
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 
GeneralRe: stuck with a trivia [modified] Pin
Emilio Garavaglia4-Feb-09 21:32
Emilio Garavaglia4-Feb-09 21:32 

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.