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

C / C++ / MFC

 
Questionmemory mapped I/O and private copies Pin
cruppstahl18-Feb-07 2:28
cruppstahl18-Feb-07 2:28 
AnswerRe: memory mapped I/O and private copies Pin
Waldermort18-Feb-07 3:17
Waldermort18-Feb-07 3:17 
GeneralRe: memory mapped I/O and private copies Pin
cruppstahl18-Feb-07 7:23
cruppstahl18-Feb-07 7:23 
QuestionHow to load text file into an array of structures..? [modified] Pin
Software_Specialist18-Feb-07 2:06
Software_Specialist18-Feb-07 2:06 
AnswerRe: How to load text file into an array of structures..? Pin
Waldermort18-Feb-07 3:11
Waldermort18-Feb-07 3:11 
GeneralRe: How to load text file into an array of structures..? Pin
Software_Specialist18-Feb-07 4:36
Software_Specialist18-Feb-07 4:36 
GeneralRe: How to load text file into an array of structures..? Pin
Waldermort18-Feb-07 5:11
Waldermort18-Feb-07 5:11 
GeneralRe: How to load text file into an array of structures..? Pin
David Crow18-Feb-07 16:29
David Crow18-Feb-07 16:29 
WalderMort wrote:
Now since the file is layed out with 5 lines per customer, I would create a function to read a single customer then call this in a loop until there are non remaining.

bool ReadCustomerDetails( FILE* hFile, CUSTOMER* pCustomer )

Open the file with fopen(), read each line with gets() then depending on the which line you read convert it to the datatype in the struct.


Your struct is good, but I would opt for reading/writing it as binary instead so that one fread() could be used per record, rather than multiple fgets() calls.


"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

"Judge not by the eye but by the heart." - Native American Proverb


GeneralRe: How to load text file into an array of structures..? Pin
Waldermort18-Feb-07 18:24
Waldermort18-Feb-07 18:24 
GeneralRe: How to load text file into an array of structures..? Pin
Software_Specialist19-Feb-07 1:53
Software_Specialist19-Feb-07 1:53 
AnswerRe: How to load text file into an array of structures..? Pin
Bram van Kampen19-Feb-07 13:30
Bram van Kampen19-Feb-07 13:30 
Questiondispaly thambnails of the images on the view Pin
vasu_sri18-Feb-07 0:33
vasu_sri18-Feb-07 0:33 
AnswerRe: dispaly thambnails of the images on the view Pin
Hamid_RT18-Feb-07 4:41
Hamid_RT18-Feb-07 4:41 
QuestionRe: dispaly thambnails of the images on the view Pin
Mark Salsbery18-Feb-07 7:19
Mark Salsbery18-Feb-07 7:19 
QuestionResource Localization (Polish Character) Pin
Anik3318-Feb-07 0:28
Anik3318-Feb-07 0:28 
AnswerRe: Resource Localization (Polish Character) Pin
ovidiucucu18-Feb-07 12:38
ovidiucucu18-Feb-07 12:38 
Questiondisplaying the thumbnail preview of the images on the view Pin
vasu_sri17-Feb-07 22:05
vasu_sri17-Feb-07 22:05 
AnswerRe: displaying the thumbnail preview of the images on the view Pin
Hamid_RT18-Feb-07 4:40
Hamid_RT18-Feb-07 4:40 
GeneralRe: displaying the thumbnail preview of the images on the view Pin
vasu_sri18-Feb-07 19:45
vasu_sri18-Feb-07 19:45 
GeneralRe: displaying the thumbnail preview of the images on the view Pin
Hamid_RT18-Feb-07 20:40
Hamid_RT18-Feb-07 20:40 
GeneralRe: displaying the thumbnail preview of the images on the view Pin
vasu_sri19-Feb-07 22:30
vasu_sri19-Feb-07 22:30 
GeneralRe: displaying the thumbnail preview of the images on the view Pin
Hamid_RT19-Feb-07 23:09
Hamid_RT19-Feb-07 23:09 
QuestionVisual C++ 6 and Windows Vista Pin
D_code_writer17-Feb-07 19:12
D_code_writer17-Feb-07 19:12 
AnswerRe: Visual C++ 6 and Windows Vista Pin
Christian Graus17-Feb-07 19:27
protectorChristian Graus17-Feb-07 19:27 
GeneralRe: Visual C++ 6 and Windows Vista Pin
Stephen Hewitt18-Feb-07 14:18
Stephen Hewitt18-Feb-07 14:18 

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.