Click here to Skip to main content
15,895,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionwhy the scroll bars of CEdit control disappeared after redraw? Pin
caobo92222-Nov-09 17:46
caobo92222-Nov-09 17:46 
QuestionMultiple Select in List Control Pin
hellogany22-Nov-09 17:00
hellogany22-Nov-09 17:00 
AnswerRe: Multiple Select in List Control Pin
Naveen22-Nov-09 17:12
Naveen22-Nov-09 17:12 
QuestionThe exact size of "string" problem [modified][Solved] Pin
tyftyftyf22-Nov-09 16:19
tyftyftyf22-Nov-09 16:19 
AnswerRe: The exact size of "string" problem [modified] Pin
«_Superman_»22-Nov-09 16:25
professional«_Superman_»22-Nov-09 16:25 
GeneralRe: The exact size of "string" problem Pin
tyftyftyf22-Nov-09 16:46
tyftyftyf22-Nov-09 16:46 
GeneralRe: The exact size of "string" problem Pin
«_Superman_»22-Nov-09 16:53
professional«_Superman_»22-Nov-09 16:53 
GeneralRe: The exact size of "string" problem Pin
tyftyftyf22-Nov-09 17:36
tyftyftyf22-Nov-09 17:36 
I see, the string probably itself has a pointer to an array of char.
And I solve the problem by adding:
memset(pabc,0,sizeof(abc));

I realized when using malloc, the memory is not cleared, so the pointer inside the string architect is just a mess, but when setting a value for string, the program found the string struncture is not all zero and considered that the string is already initialized so the program just change the value of the array of char that pointer pointed to.Ofcourse that pointer is just a mess, so "illegal pointer" occured.

If I clear the memory first, the pointer is just zero, so program will initialize it first.

Forgive my poor english....

Thanks!
AnswerRe: The exact size of "string" problem [modified] Pin
JohnCz22-Nov-09 18:44
JohnCz22-Nov-09 18:44 
GeneralRe: The exact size of "string" problem Pin
tyftyftyf22-Nov-09 19:27
tyftyftyf22-Nov-09 19:27 
GeneralRe: The exact size of "string" problem Pin
JohnCz23-Nov-09 6:10
JohnCz23-Nov-09 6:10 
GeneralRe: The exact size of "string" problem Pin
tyftyftyf23-Nov-09 16:55
tyftyftyf23-Nov-09 16:55 
GeneralRe: The exact size of "string" problem Pin
JohnCz23-Nov-09 17:36
JohnCz23-Nov-09 17:36 
Questionrunning time of java pograms Pin
cool_joy222-Nov-09 16:14
cool_joy222-Nov-09 16:14 
AnswerRe: running time of java pograms Pin
Richard MacCutchan22-Nov-09 21:36
mveRichard MacCutchan22-Nov-09 21:36 
GeneralRe: running time of java pograms Pin
cool_joy225-Nov-09 22:34
cool_joy225-Nov-09 22:34 
GeneralRe: running time of java pograms Pin
Richard MacCutchan25-Nov-09 23:49
mveRichard MacCutchan25-Nov-09 23:49 
GeneralRe: running time of java pograms Pin
cool_joy228-Nov-09 1:52
cool_joy228-Nov-09 1:52 
QuestionITextServices::Release() doesn't effect.That causes memory leaking. Pin
hawkgao012922-Nov-09 15:14
hawkgao012922-Nov-09 15:14 
QuestionError during compilation that I dont understand. [Solved] Pin
stianhh22-Nov-09 0:59
stianhh22-Nov-09 0:59 
AnswerRe: Error during compilation that I dont understand. Pin
Richard MacCutchan22-Nov-09 1:11
mveRichard MacCutchan22-Nov-09 1:11 
GeneralRe: Error during compilation that I dont understand. Pin
stianhh22-Nov-09 9:37
stianhh22-Nov-09 9:37 
GeneralRe: Error during compilation that I dont understand. Pin
Richard MacCutchan22-Nov-09 11:41
mveRichard MacCutchan22-Nov-09 11:41 
AnswerRe: Error during compilation that I dont understand. Pin
Cedric Moonen22-Nov-09 3:58
Cedric Moonen22-Nov-09 3:58 
QuestionCode snippet for searching a file in directory (directory can have subdirectories in it) Pin
V K 221-Nov-09 19:16
V K 221-Nov-09 19: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.