Click here to Skip to main content
15,905,566 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionNeed some solutions! Pin
Johan1316-Feb-08 8:04
Johan1316-Feb-08 8:04 
GeneralRe: Need some solutions! Pin
Hamid_RT18-Feb-08 7:33
Hamid_RT18-Feb-08 7:33 
QuestionReading a file into an array Pin
jonsey2984716-Feb-08 4:51
jonsey2984716-Feb-08 4:51 
GeneralRe: Reading a file into an array Pin
CPallini16-Feb-08 6:54
mveCPallini16-Feb-08 6:54 
GeneralRe: Reading a file into an array Pin
jonsey2984716-Feb-08 8:24
jonsey2984716-Feb-08 8:24 
GeneralRe: Reading a file into an array Pin
CPallini16-Feb-08 10:01
mveCPallini16-Feb-08 10:01 
GeneralRe: Reading a file into an array Pin
jonsey2984716-Feb-08 15:25
jonsey2984716-Feb-08 15:25 
GeneralRe: Reading a file into an array Pin
CPallini16-Feb-08 22:35
mveCPallini16-Feb-08 22:35 
I think you have to be more careful on memory handling, for instance in the following lines

jonsey29847 wrote:
DTCodes[i].Description = tcDescription;
ZeroMemory(tcDescription, 0xff);



you first assign tcDescription to DTCodes[i].Description and then erase the content of the memory pointed by both tcDescription and DTCodes[i].Description thus loosing the information.



BTW struct has to be declared in the header file, but is better to define DTCodes[0x10]; in one source file (you can use extern struct DTC DTCodes[0x10]; in the header file to make it visible by all of the source files).

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke


GeneralRe: Reading a file into an array Pin
jonsey2984717-Feb-08 10:18
jonsey2984717-Feb-08 10:18 
GeneralRe: Reading a file into an array Pin
CPallini17-Feb-08 21:53
mveCPallini17-Feb-08 21:53 
GeneralRe: Reading a file into an array Pin
Rajkumar R16-Feb-08 23:47
Rajkumar R16-Feb-08 23:47 
GeneralRe: Reading a file into an array Pin
jonsey2984717-Feb-08 10:31
jonsey2984717-Feb-08 10:31 
GeneralRe: Reading a file into an array Pin
Rajkumar R17-Feb-08 18:22
Rajkumar R17-Feb-08 18:22 
GeneralRe: Reading a file into an array Pin
jonsey2984718-Feb-08 11:34
jonsey2984718-Feb-08 11:34 
GeneralRe: Reading a file into an array Pin
jonsey2984718-Feb-08 11:36
jonsey2984718-Feb-08 11:36 
QuestionEmbed a CToolBar within a CDialogBar Pin
jeffb4216-Feb-08 4:45
jeffb4216-Feb-08 4:45 
Questionfunctions with 2d array argument Pin
Adnan Merter16-Feb-08 4:18
Adnan Merter16-Feb-08 4:18 
QuestionRe: functions with 2d array argument Pin
CPallini16-Feb-08 4:39
mveCPallini16-Feb-08 4:39 
GeneralRe: functions with 2d array argument Pin
Adnan Merter16-Feb-08 5:24
Adnan Merter16-Feb-08 5:24 
GeneralRe: functions with 2d array argument Pin
CPallini16-Feb-08 6:46
mveCPallini16-Feb-08 6:46 
Generalsimulate ctrl+alt+delete keys in windows Pin
Abdul_khaliq_16-Feb-08 2:27
Abdul_khaliq_16-Feb-08 2:27 
GeneralRe: simulate ctrl+alt+delete keys in windows Pin
Baltoro17-Feb-08 10:13
Baltoro17-Feb-08 10:13 
GeneralBorderless ComboBox Pin
Humayun Kabir Hemoo16-Feb-08 0:24
Humayun Kabir Hemoo16-Feb-08 0:24 
GeneralRe: Borderless ComboBox Pin
Mark Salsbery17-Feb-08 8:47
Mark Salsbery17-Feb-08 8:47 
GeneralRe: Borderless ComboBox Pin
Humayun Kabir Hemoo18-Feb-08 4:15
Humayun Kabir Hemoo18-Feb-08 4:15 

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.