Click here to Skip to main content
16,007,843 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to convert a byte array to decimal integer? Pin
Lim Bio Liong18-Oct-04 23:46
Lim Bio Liong18-Oct-04 23:46 
QuestionCan't change the font and text color of an edit box using CFontDialog ? Pin
VCSharp00718-Oct-04 20:47
VCSharp00718-Oct-04 20:47 
AnswerRe: Can't change the font and text color of an edit box using CFontDialog ? Pin
22491718-Oct-04 21:26
22491718-Oct-04 21:26 
GeneralMaximize MDI Child window when Main window is maximized Pin
ledallam18-Oct-04 20:45
ledallam18-Oct-04 20:45 
GeneralRe: Maximize MDI Child window when Main window is maximized Pin
Azghar Hussain18-Oct-04 22:38
professionalAzghar Hussain18-Oct-04 22:38 
GeneralFtpOpenFile Error Pin
antonimasso18-Oct-04 20:41
antonimasso18-Oct-04 20:41 
General2 DirectX questions Pin
Cedric Moonen18-Oct-04 20:26
Cedric Moonen18-Oct-04 20:26 
Questionhow can i used this struct. Pin
maranatha18-Oct-04 20:26
maranatha18-Oct-04 20:26 
problem is memory full. can't free.
in this sample source below.
so, how can i free memory in struct.

////////////////////////////////////////////////
// begin source

typedef struct
{
char* sztext;
int nindex;
}T_TEST_T;

typedef struct
{
T_TEST_T *pptest;
char* sztext;
int nindex;
}T_TEST;

void testRun( )
{
T_TEST *ptest
ptest = new T_TEST;
ptest->pptest = new T_TEST_T;

for(int n=0;n<100000;n++)
{
ptest->sztext = new char[1024];
strcpy(ptest->sztext, "test one deep step !!!");
ptest->nindex = 777;

ptest->pptest->sztext = new char[1024];
strcpy(ptest->pptest->sztext, "test two deep step ");
ptest->pptest->nindex = 888;
}
// + must used ptest in struct +

if( ptest->sztext != NULL )
delete []ptest->sztext ;
if( ptest->pptest->sztext != NULL)
delete []ptest->pptest->sztext;
if( ptest->pptest )
delete ptest->pptest;
if( ptest )
delete ptest;

// can't free memory..

// end source
////////////////////////////////////////////////////////////////////////
thank's see this ~ waiting your reply.
AnswerRe: how can i used this struct. Pin
bryce18-Oct-04 20:36
bryce18-Oct-04 20:36 
AnswerRe: how can i used this struct. Pin
Cedric Moonen18-Oct-04 20:47
Cedric Moonen18-Oct-04 20:47 
GeneralRe: how can i used this struct. Pin
Anonymous19-Oct-04 14:41
Anonymous19-Oct-04 14:41 
AnswerRe: how can i used this struct. Pin
David Crow19-Oct-04 2:52
David Crow19-Oct-04 2:52 
GeneralRe: how can i used this struct. Pin
Anonymous19-Oct-04 14:39
Anonymous19-Oct-04 14:39 
GeneralRe: how can i used this struct. Pin
David Crow20-Oct-04 3:00
David Crow20-Oct-04 3:00 
GeneralTab control with mdi Pin
vc-programmer-18-Oct-04 19:27
vc-programmer-18-Oct-04 19:27 
GeneralMDI with check control Pin
vc-programmer-18-Oct-04 19:21
vc-programmer-18-Oct-04 19:21 
GeneralRe: MDI with check control Pin
Sujan Christo18-Oct-04 19:56
Sujan Christo18-Oct-04 19:56 
QuestionDirectshow - can a filter detect that the user is currently seeking? Pin
Indrawati18-Oct-04 19:15
Indrawati18-Oct-04 19:15 
GeneralAdvice required Pin
Imtiaz Murtaza18-Oct-04 19:04
Imtiaz Murtaza18-Oct-04 19:04 
GeneralRe: Advice required Pin
shiraztk18-Oct-04 19:24
shiraztk18-Oct-04 19:24 
GeneralRe: Advice required Pin
bryce18-Oct-04 20:37
bryce18-Oct-04 20:37 
GeneralRe: Advice required Pin
Imtiaz Murtaza18-Oct-04 20:42
Imtiaz Murtaza18-Oct-04 20:42 
GeneralRe: Advice required Pin
Henry miller19-Oct-04 3:56
Henry miller19-Oct-04 3:56 
QuestionHow to create true type font Pin
Azghar Hussain18-Oct-04 18:59
professionalAzghar Hussain18-Oct-04 18:59 
AnswerRe: How to create true type font Pin
22491718-Oct-04 21:37
22491718-Oct-04 21:37 

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.