Click here to Skip to main content
15,894,106 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionLoad CSV file to a database in Windows 64bit Pin
aks.14-Jun-15 22:36
aks.14-Jun-15 22:36 
AnswerRe: Load CSV file to a database in Windows 64bit Pin
Jochen Arndt14-Jun-15 23:45
professionalJochen Arndt14-Jun-15 23:45 
QuestionNew to C++ and Programming, Absolutely new Pin
Member 1176562614-Jun-15 18:36
Member 1176562614-Jun-15 18:36 
AnswerRe: New to C++ and Programming, Absolutely new Pin
Amarnath S14-Jun-15 19:00
professionalAmarnath S14-Jun-15 19:00 
GeneralRe: New to C++ and Programming, Absolutely new Pin
Member 1176562614-Jun-15 19:26
Member 1176562614-Jun-15 19:26 
GeneralRe: New to C++ and Programming, Absolutely new Pin
Richard MacCutchan14-Jun-15 21:42
mveRichard MacCutchan14-Jun-15 21:42 
QuestionAfxGetApp anomaly Pin
ForNow10-Jun-15 9:18
ForNow10-Jun-15 9:18 
QuestionOdd property sheet behavior Pin
David Crow10-Jun-15 4:41
David Crow10-Jun-15 4:41 
AnswerRe: Odd property sheet behavior Pin
Chris Losinger10-Jun-15 5:26
professionalChris Losinger10-Jun-15 5:26 
QuestionAdd lib by pragma Pin
_Flaviu10-Jun-15 0:32
_Flaviu10-Jun-15 0:32 
AnswerRe: Add lib by pragma Pin
David Crow10-Jun-15 2:46
David Crow10-Jun-15 2:46 
GeneralRe: Add lib by pragma Pin
_Flaviu10-Jun-15 23:25
_Flaviu10-Jun-15 23:25 
Questionbad pointer error when I read a class object with CString member Pin
manoharbalu8-Jun-15 20:13
manoharbalu8-Jun-15 20:13 
Answer[Repost] Pin
Sascha Lefèvre8-Jun-15 20:36
professionalSascha Lefèvre8-Jun-15 20:36 
SuggestionRe: bad pointer error when I read a class object with CString member Pin
David Crow9-Jun-15 5:37
David Crow9-Jun-15 5:37 
AnswerRe: bad pointer error when I read a class object with CString member Pin
Stefan_Lang12-Jun-15 0:13
Stefan_Lang12-Jun-15 0:13 
fwrite only stores the memory contents of the class test - it doesn't care about the class definition except for it's size in memory.

CString stores the text in dynamic memory, only handle (pointer) to that memory is directly stored inside the CString object, therefore writing oTest just stores that pointer, but not the contents. If you use char[50] instead, that is a fixed-size array that is stored fully in your class test, and therewore fwrite will write it to file correctly.

The correct way to implement streaming for your test class in C++ is by overloading the streaming operators. See http://www.tutorialspoint.com/cplusplus/input_output_operators_overloading.htm[^]
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

QuestionWindows 8.1 TouchScreen panning does not scroll window for MFC Scrollview or Win32 apps Pin
bob169727-Jun-15 7:10
bob169727-Jun-15 7:10 
AnswerRe: Windows 8.1 TouchScreen panning does not scroll window for MFC Scrollview or Win32 apps Pin
bob1697220-Jun-15 3:31
bob1697220-Jun-15 3:31 
Questionlinked list in C Pin
a random user7-Jun-15 4:28
a random user7-Jun-15 4:28 
AnswerRe: linked list in C Pin
Chris Losinger9-Jun-15 4:55
professionalChris Losinger9-Jun-15 4:55 
Questionneed help with linked structs at C language Pin
a random user5-Jun-15 23:57
a random user5-Jun-15 23:57 
AnswerRe: need help with linked structs at C language Pin
Richard MacCutchan6-Jun-15 0:29
mveRichard MacCutchan6-Jun-15 0:29 
GeneralRe: need help with linked structs at C language Pin
a random user6-Jun-15 0:56
a random user6-Jun-15 0:56 
GeneralRe: need help with linked structs at C language Pin
Frankie-C6-Jun-15 6:42
Frankie-C6-Jun-15 6:42 
GeneralRe: need help with linked structs at C language Pin
a random user6-Jun-15 7:03
a random user6-Jun-15 7:03 

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.