Click here to Skip to main content
15,890,845 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Size of an empty class Pin
T21023-Jan-11 2:43
T21023-Jan-11 2:43 
AnswerRe: Size of an empty class PinPopular
«_Superman_»3-Jan-11 6:03
professional«_Superman_»3-Jan-11 6:03 
GeneralRe: Size of an empty class Pin
Emilio Garavaglia3-Jan-11 9:16
Emilio Garavaglia3-Jan-11 9:16 
QuestionRe: Size of an empty class Pin
CPallini3-Jan-11 9:28
mveCPallini3-Jan-11 9:28 
AnswerRe: Size of an empty class Pin
Emilio Garavaglia3-Jan-11 9:40
Emilio Garavaglia3-Jan-11 9:40 
GeneralRe: Size of an empty class Pin
CPallini3-Jan-11 9:45
mveCPallini3-Jan-11 9:45 
AnswerRe: Size of an empty class Pin
Shivanand Gupta3-Jan-11 18:21
Shivanand Gupta3-Jan-11 18:21 
Questionarray of char* Pin
piul3-Jan-11 0:14
piul3-Jan-11 0:14 
Hi there!

I need an array of strings of char * type and I am not clear about how to free up memory after use. The code below does not work.
char * ptr_p_c[3];
ptr_p_c[0] = new char;
strcpy (ptr_p_c[0], "hi there");
ptr_p_c[1] = new char;
strcpy (ptr_p_c[1], "whatever");

delete ptr_p_c;


I know I shouldn't be using this type for strings and all this. Believe me, I've tried repeatedly to convince my customer this is not the right way to do things, but unfortunately it is not my decission...

Thanks a lot.
AnswerRe: array of char* Pin
bleedingfingers3-Jan-11 0:30
bleedingfingers3-Jan-11 0:30 
GeneralRe: array of char* Pin
piul3-Jan-11 0:40
piul3-Jan-11 0:40 
GeneralRe: array of char* Pin
bleedingfingers3-Jan-11 0:56
bleedingfingers3-Jan-11 0:56 
AnswerRe: array of char* Pin
CPallini3-Jan-11 0:50
mveCPallini3-Jan-11 0:50 
GeneralRe: array of char* Pin
T21023-Jan-11 1:04
T21023-Jan-11 1:04 
GeneralRe: array of char* Pin
Alan Balkany5-Jan-11 4:15
Alan Balkany5-Jan-11 4:15 
GeneralRe: array of char* Pin
CPallini5-Jan-11 7:24
mveCPallini5-Jan-11 7:24 
GeneralRe: array of char* Pin
Alan Balkany5-Jan-11 8:38
Alan Balkany5-Jan-11 8:38 
QuestionRe: array of char* Pin
David Crow3-Jan-11 3:12
David Crow3-Jan-11 3:12 
AnswerRe: array of char* Pin
Maximilien3-Jan-11 4:32
Maximilien3-Jan-11 4:32 
AnswerRe: array of char* Pin
Richard MacCutchan3-Jan-11 4:48
mveRichard MacCutchan3-Jan-11 4:48 
GeneralRe: array of char* Pin
CPallini3-Jan-11 9:39
mveCPallini3-Jan-11 9:39 
JokeRe: array of char* Pin
«_Superman_»3-Jan-11 6:07
professional«_Superman_»3-Jan-11 6:07 
JokeRe: array of char* Pin
CPallini3-Jan-11 10:01
mveCPallini3-Jan-11 10:01 
JokeRe: array of char* Pin
bleedingfingers3-Jan-11 20:45
bleedingfingers3-Jan-11 20:45 
JokeRe: array of char* Pin
«_Superman_»4-Jan-11 3:21
professional«_Superman_»4-Jan-11 3:21 
Questionget a value from dialog box to dialog box? Pin
mathivanaan2-Jan-11 23:16
mathivanaan2-Jan-11 23:16 

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.