Click here to Skip to main content
16,010,650 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: adding variables to a struct that were read in from a file Pin
johnstonsk27-Jun-03 5:24
johnstonsk27-Jun-03 5:24 
GeneralRe: adding variables to a struct that were read in from a file Pin
Rage27-Jun-03 4:47
professionalRage27-Jun-03 4:47 
GeneralRe: adding variables to a struct that were read in from a file Pin
Ryan Binns27-Jun-03 4:59
Ryan Binns27-Jun-03 4:59 
GeneralRe: adding variables to a struct that were read in from a file Pin
John M. Drescher27-Jun-03 5:53
John M. Drescher27-Jun-03 5:53 
GeneralRe: adding variables to a struct that were read in from a file Pin
David Crow27-Jun-03 4:54
David Crow27-Jun-03 4:54 
GeneralRe: adding variables to a struct that were read in from a file Pin
johnstonsk27-Jun-03 5:18
johnstonsk27-Jun-03 5:18 
GeneralRe: adding variables to a struct that were read in from a file Pin
David Crow27-Jun-03 5:42
David Crow27-Jun-03 5:42 
GeneralRe: adding variables to a struct that were read in from a file Pin
Ryan Binns27-Jun-03 4:56
Ryan Binns27-Jun-03 4:56 
Instead of putting "i<sizeof(s.Name)" in your for loop, use "i<sizeof(s.Name)/sizeof(string)". sizeof() gives you the size of the variable/type in bytes, not the number of elements in the array. The size of a string is at least 4 bytes, so your loop will go at least 20 times - 5*sizeof(string). Your memory will therefore be overwritten by any writes after the 5th loop, and you'll end up with rubbish.

Ryan

Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)

Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

GeneralRe: adding variables to a struct that were read in from a file Pin
johnstonsk27-Jun-03 5:24
johnstonsk27-Jun-03 5:24 
GeneralRe: adding variables to a struct that were read in from a file Pin
Ryan Binns27-Jun-03 13:48
Ryan Binns27-Jun-03 13:48 
GeneralAbout SetIcon Pin
olinn27-Jun-03 3:56
olinn27-Jun-03 3:56 
GeneralRe: About SetIcon Pin
Rage27-Jun-03 4:25
professionalRage27-Jun-03 4:25 
Generalup and down arrows in a string. Pin
mcgahanfl27-Jun-03 3:29
mcgahanfl27-Jun-03 3:29 
GeneralRe: up and down arrows in a string. Pin
basementman27-Jun-03 3:43
basementman27-Jun-03 3:43 
GeneralRe: up and down arrows in a string. Pin
mcgahanfl27-Jun-03 4:14
mcgahanfl27-Jun-03 4:14 
GeneralRe: up and down arrows in a string. Pin
basementman27-Jun-03 4:17
basementman27-Jun-03 4:17 
GeneralRe: up and down arrows in a string. Pin
mcgahanfl27-Jun-03 4:26
mcgahanfl27-Jun-03 4:26 
QuestionHow to set the text verticle center in CEdit Pin
Bosicat27-Jun-03 3:11
Bosicat27-Jun-03 3:11 
AnswerRe: How to set the text verticle center in CEdit Pin
Ryan Binns27-Jun-03 4:33
Ryan Binns27-Jun-03 4:33 
GeneralToolbar question Pin
User 988527-Jun-03 3:08
User 988527-Jun-03 3:08 
GeneralRe: Toolbar question Pin
Ryan Binns27-Jun-03 4:31
Ryan Binns27-Jun-03 4:31 
GeneralRe: Toolbar question Pin
User 988527-Jun-03 4:39
User 988527-Jun-03 4:39 
GeneralProblem while deriving from CList Pin
Charles Liu27-Jun-03 2:40
Charles Liu27-Jun-03 2:40 
Questionediting 24bit toolbar in editor??? Pin
schaereran@gmx.net27-Jun-03 2:39
schaereran@gmx.net27-Jun-03 2:39 
GeneralSubclassing windows of other processes Pin
S O S27-Jun-03 2:12
S O S27-Jun-03 2:12 

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.