Click here to Skip to main content
15,921,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SSE Pin
peter27139-Jan-03 8:51
peter27139-Jan-03 8:51 
GeneralRe: SSE Pin
l a u r e n9-Jan-03 8:58
l a u r e n9-Jan-03 8:58 
GeneralRe: SSE Pin
peter27139-Jan-03 9:26
peter27139-Jan-03 9:26 
GeneralRe: SSE Pin
geo_m9-Jan-03 9:12
geo_m9-Jan-03 9:12 
QuestionRelease mode exception? Pin
clintsinger9-Jan-03 7:46
clintsinger9-Jan-03 7:46 
AnswerThe main thing is to create pdbs for release build Pin
AlexO9-Jan-03 8:03
AlexO9-Jan-03 8:03 
GeneralRe: The main thing is to create pdbs for release build Pin
clintsinger9-Jan-03 8:27
clintsinger9-Jan-03 8:27 
QuestionMultidimensional arrays - am I doing it correctly? Pin
Dominik Reichl9-Jan-03 7:46
Dominik Reichl9-Jan-03 7:46 
Hello,

I just wanted to know if the following piece of code is correct,
won't have any memory leak, will be portable, will always work, etc...
Or would you code it in another way?

// Dynamic allocation with new is required!
static char (*g_szCMOSInfo)[MAX_CMOS_STRING];
g_szCMOSInfo = new char[NUM_CMOS_STRINGS][MAX_CMOS_STRING];

// Fill the array with strings
strcpy(g_szCMOSInfo[i++], "Time - Seconds");
strcpy(g_szCMOSInfo[i++], "Alarm - Seconds");
strcpy(g_szCMOSInfo[i++], "Time - Minutes");
strcpy(g_szCMOSInfo[i++], "Alarm - Minutes");
strcpy(g_szCMOSInfo[i++], "Time - Hours");
strcpy(g_szCMOSInfo[i++], "Alarm - Hours");
strcpy(g_szCMOSInfo[i++], "Date - Day Of The Week");
strcpy(g_szCMOSInfo[i++], "Date - Day");
strcpy(g_szCMOSInfo[i++], "Date - Month");
strcpy(g_szCMOSInfo[i++], "Date - Year");

SAFE_DELETE_ARRAY(g_szCMOSInfo);
Where SAFE_DELETE_ARRAY is defined as:
#define SAFE_DELETE_ARRAY(p) { if((p) != NULL) { delete [] (p);  (p) = NULL; } }


Confused | :confused:
-Dominik
AnswerRe: Multidimensional arrays - am I doing it correctly? Pin
AlexO9-Jan-03 7:56
AlexO9-Jan-03 7:56 
GeneralRe: Multidimensional arrays - am I doing it correctly? Pin
Dominik Reichl9-Jan-03 8:50
Dominik Reichl9-Jan-03 8:50 
GeneralRe: Multidimensional arrays - am I doing it correctly? Pin
AlexO9-Jan-03 9:26
AlexO9-Jan-03 9:26 
AnswerRe: Multidimensional arrays - am I doing it correctly? Pin
Alvaro Mendez9-Jan-03 8:52
Alvaro Mendez9-Jan-03 8:52 
GeneralRe: Multidimensional arrays - am I doing it correctly? Pin
Dominik Reichl9-Jan-03 9:09
Dominik Reichl9-Jan-03 9:09 
GeneralRe: Multidimensional arrays - am I doing it correctly? Pin
Alvaro Mendez9-Jan-03 9:26
Alvaro Mendez9-Jan-03 9:26 
QuestionOUT OF MEMORY in RELEASE VERSION but OK in DEBUG ?? Pin
youssef9-Jan-03 7:42
youssef9-Jan-03 7:42 
AnswerRe: OUT OF MEMORY in RELEASE VERSION but OK in DEBUG ?? Pin
Chris Losinger9-Jan-03 8:02
professionalChris Losinger9-Jan-03 8:02 
GeneralRe: SetCurrentDirectory() not working?? Pin
Ted Ferenc9-Jan-03 6:48
Ted Ferenc9-Jan-03 6:48 
GeneralRe: SetCurrentDirectory() not working?? Pin
uandrej9-Jan-03 9:56
uandrej9-Jan-03 9:56 
GeneralRe: SetCurrentDirectory() not working?? Pin
Ted Ferenc9-Jan-03 21:31
Ted Ferenc9-Jan-03 21:31 
GeneralRe: SetCurrentDirectory() not working?? Pin
Anonymous9-Jan-03 23:49
Anonymous9-Jan-03 23:49 
GeneralSDK - MAPI .oft Files Pin
Harald Diel9-Jan-03 6:02
Harald Diel9-Jan-03 6:02 
GeneralRe: SDK - MAPI .oft Files Pin
Harald Diel12-Jan-03 22:50
Harald Diel12-Jan-03 22:50 
QuestionHow to create a menu item on the fly Pin
ns9-Jan-03 5:25
ns9-Jan-03 5:25 
AnswerRe: How to create a menu item on the fly Pin
Michael Dunn9-Jan-03 5:35
sitebuilderMichael Dunn9-Jan-03 5:35 
Generalsetting up a keyboard system wide hook (contains the code, if you would like to see it...) Pin
Joan M9-Jan-03 5:00
professionalJoan M9-Jan-03 5:00 

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.