Click here to Skip to main content
15,867,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reading from File question... Pin
ThatsAlok25-Oct-06 20:51
ThatsAlok25-Oct-06 20:51 
GeneralRe: Reading from File question... Pin
Zac Howland26-Oct-06 4:03
Zac Howland26-Oct-06 4:03 
QuestionRe: Reading from File question... Pin
David Crow26-Oct-06 4:34
David Crow26-Oct-06 4:34 
AnswerRe: Reading from File question... Pin
Zac Howland26-Oct-06 4:51
Zac Howland26-Oct-06 4:51 
GeneralRe: Reading from File question... Pin
David Crow26-Oct-06 5:02
David Crow26-Oct-06 5:02 
GeneralRe: Reading from File question... Pin
Zac Howland26-Oct-06 6:04
Zac Howland26-Oct-06 6:04 
QuestionRe: Reading from File question... Pin
David Crow29-May-07 10:12
David Crow29-May-07 10:12 
AnswerRe: Reading from File question... Pin
Zac Howland30-May-07 7:07
Zac Howland30-May-07 7:07 
Looking back at it, is a slight bug in my example code. Basically, since the id's and grades are both longs, there is no way to tell them apart. It would probably be helpful to modify the output slightly by putting a grade count in between the student id and the first grade so that you can modify the copy call (for obtaining the grades) to just grab that many items (instead of grabbing everything that is left in the file). Another (possibly simpler alternative) would be to grab the student id, and then use getline to obtain the rest of the line, place that string into a stringstream and then call copy on it (this solution has the added benefit of not having to change the input/output file format).

If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

GeneralRe: Reading from File question... Pin
David Crow30-May-07 7:22
David Crow30-May-07 7:22 
GeneralRe: Reading from File question... Pin
Zac Howland30-May-07 9:13
Zac Howland30-May-07 9:13 
AnswerRe: Reading from File question... Pin
David Crow26-Oct-06 3:59
David Crow26-Oct-06 3:59 
QuestionTime consuming error Pin
Oliver12325-Oct-06 11:19
Oliver12325-Oct-06 11:19 
AnswerRe: Time consuming error Pin
led mike25-Oct-06 11:36
led mike25-Oct-06 11:36 
GeneralRe: Time consuming error Pin
Stephen Hewitt25-Oct-06 15:41
Stephen Hewitt25-Oct-06 15:41 
GeneralRe: Time consuming error Pin
led mike26-Oct-06 5:25
led mike26-Oct-06 5:25 
AnswerRe: Time consuming error Pin
Mark Salsbery25-Oct-06 12:00
Mark Salsbery25-Oct-06 12:00 
GeneralRe: Time consuming error Pin
led mike25-Oct-06 12:02
led mike25-Oct-06 12:02 
GeneralRe: Time consuming error Pin
Mark Salsbery25-Oct-06 12:25
Mark Salsbery25-Oct-06 12:25 
AnswerRe: Time consuming error Pin
Stephen Hewitt25-Oct-06 15:37
Stephen Hewitt25-Oct-06 15:37 
QuestionDialog Application-Adding Color to Display Data Pin
jerry1211a25-Oct-06 9:52
jerry1211a25-Oct-06 9:52 
AnswerRe: Dialog Application-Adding Color to Display Data Pin
Mark Salsbery25-Oct-06 10:40
Mark Salsbery25-Oct-06 10:40 
AnswerRe: Dialog Application-Adding Color to Display Data Pin
Hamid_RT25-Oct-06 19:29
Hamid_RT25-Oct-06 19:29 
GeneralRe: Dialog Application-Adding Color to Display Data Pin
jerry1211a26-Oct-06 2:36
jerry1211a26-Oct-06 2:36 
GeneralRe: Dialog Application-Adding Color to Display Data Pin
Hamid_RT26-Oct-06 2:52
Hamid_RT26-Oct-06 2:52 
GeneralRe: Dialog Application-Adding Color to Display Data Pin
jerry1211a26-Oct-06 3:01
jerry1211a26-Oct-06 3:01 

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.