Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question[Solved] Passing an element from a list [modified] Pin
crgmustang13-Jul-11 13:50
crgmustang13-Jul-11 13:50 
AnswerRe: Passing an element from a list Pin
«_Superman_»13-Jul-11 14:48
professional«_Superman_»13-Jul-11 14:48 
GeneralRe: Passing an element from a list Pin
crgmustang14-Jul-11 5:28
crgmustang14-Jul-11 5:28 
QuestionPointer Maths Pin
KeithF12-Jul-11 3:25
KeithF12-Jul-11 3:25 
AnswerRe: Pointer Maths [modified] Pin
Stefan_Lang12-Jul-11 3:52
Stefan_Lang12-Jul-11 3:52 
GeneralRe: Pointer Maths Pin
Legor12-Jul-11 4:02
Legor12-Jul-11 4:02 
GeneralRe: Pointer Maths Pin
Stefan_Lang12-Jul-11 4:16
Stefan_Lang12-Jul-11 4:16 
AnswerRe: Pointer Maths Pin
Legor12-Jul-11 3:55
Legor12-Jul-11 3:55 
When using sizeof with a structure it is not guaranteed that you get the sum of the single components due to Structure padding (wiki for it). Just printf the sizeof() of your struct and you will see that its not 12 Bytes.

Anyway it is very unclear to me why are you even trying to do it this way. Dont mess with addresses and pointers in such an unsafe way. Who even tells you that you could just decrease the given int pointer and it would still point to a valid adress.

E.g. just use the indices of the array to get the last element.
GeneralRe: Pointer Maths Pin
Rick York13-Jul-11 18:39
mveRick York13-Jul-11 18:39 
GeneralRe: Pointer Maths Pin
Legor17-Jul-11 0:39
Legor17-Jul-11 0:39 
GeneralRe: Pointer Maths Pin
enhzflep13-Jul-11 19:14
enhzflep13-Jul-11 19:14 
GeneralRe: Pointer Maths Pin
Richard MacCutchan13-Jul-11 21:53
mveRichard MacCutchan13-Jul-11 21:53 
QuestionHow to do 2 or more process simultaneously? Pin
Le@rner12-Jul-11 2:21
Le@rner12-Jul-11 2:21 
QuestionRe: How to do 2 or more process simultaneously? Pin
CPallini12-Jul-11 3:02
mveCPallini12-Jul-11 3:02 
AnswerRe: How to do 2 or more process simultaneously? Pin
Le@rner12-Jul-11 18:26
Le@rner12-Jul-11 18:26 
GeneralRe: How to do 2 or more process simultaneously? [fixed] Pin
CPallini12-Jul-11 21:09
mveCPallini12-Jul-11 21:09 
GeneralRe: How to do 2 or more process simultaneously? Pin
Le@rner12-Jul-11 21:16
Le@rner12-Jul-11 21:16 
GeneralRe: How to do 2 or more process simultaneously? Pin
CPallini12-Jul-11 21:24
mveCPallini12-Jul-11 21:24 
AnswerRe: How to do 2 or more process simultaneously? Pin
Albert Holguin12-Jul-11 4:56
professionalAlbert Holguin12-Jul-11 4:56 
AnswerRe: How to do 2 or more process simultaneously? Pin
jschell12-Jul-11 10:21
jschell12-Jul-11 10:21 
GeneralRe: How to do 2 or more process simultaneously? Pin
Le@rner12-Jul-11 19:54
Le@rner12-Jul-11 19:54 
GeneralRe: How to do 2 or more process simultaneously? Pin
Chris Walters13-Jul-11 6:24
Chris Walters13-Jul-11 6:24 
AnswerRe: How to do 2 or more process simultaneously? Pin
Eugen Podsypalnikov12-Jul-11 22:18
Eugen Podsypalnikov12-Jul-11 22:18 
GeneralRe: How to do 2 or more process simultaneously? Pin
Le@rner15-Jul-11 21:57
Le@rner15-Jul-11 21:57 
QuestionHow to set the multi selection property of a list box as TRUE through the code Pin
Amrit Agr12-Jul-11 0:34
Amrit Agr12-Jul-11 0: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.