Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MDI: New document using wizard (Where are you Microsoft people) Pin
FarPointer7-Jun-06 5:36
FarPointer7-Jun-06 5:36 
GeneralRe: MDI: New document using wizard (Where are you Microsoft people) Pin
Tarek Jabri7-Jun-06 6:19
Tarek Jabri7-Jun-06 6:19 
GeneralRe: MDI: New document using wizard (Where are you Microsoft people) Pin
FarPointer7-Jun-06 6:43
FarPointer7-Jun-06 6:43 
QuestionHow to display graph in chart using Excel Pin
MikeRT7-Jun-06 4:46
MikeRT7-Jun-06 4:46 
QuestionI get a Windows error when I remove an else statement... Pin
Lord Kixdemp7-Jun-06 4:23
Lord Kixdemp7-Jun-06 4:23 
AnswerRe: I get a Windows error when I remove an else statement... Pin
Cedric Moonen7-Jun-06 4:34
Cedric Moonen7-Jun-06 4:34 
AnswerRe: I get a Windows error when I remove an else statement... Pin
Viorel.7-Jun-06 4:42
Viorel.7-Jun-06 4:42 
AnswerRe: I get a Windows error when I remove an else statement... Pin
Sarath C7-Jun-06 4:45
Sarath C7-Jun-06 4:45 
Kixdemp wrote:
strcat(newName, fileName);


the problem is here

newName not having enough memory to contain the data in "filename"

newName can hold till "screenshot"
but the file name is trying copy whole string ("screeshot.jpg") to the newName. So a buffer overrun occured.
hope u clear.

try using strncpy.

Always keep in mind that "for a string buffer allocate buffersize +1" to hold the end null character. make sure that it is initialized to NULL to avoid unexpected behavior

SaRath.

"Don't Do Different things... Do Things Differently..."

Understanding State Pattern in C++

QuestionRe: I get a Windows error when I remove an else statement... Pin
David Crow7-Jun-06 4:45
David Crow7-Jun-06 4:45 
AnswerRe: I get a Windows error when I remove an else statement... Pin
Lord Kixdemp7-Jun-06 18:04
Lord Kixdemp7-Jun-06 18:04 
GeneralRe: I get a Windows error when I remove an else statement... Pin
David Crow8-Jun-06 2:42
David Crow8-Jun-06 2:42 
GeneralRe: I get a Windows error when I remove an else statement... Pin
Lord Kixdemp8-Jun-06 3:11
Lord Kixdemp8-Jun-06 3:11 
GeneralRe: I get a Windows error when I remove an else statement... Pin
David Crow8-Jun-06 3:20
David Crow8-Jun-06 3:20 
QuestionSocket programming error MFC Pin
Aqueel7-Jun-06 4:14
Aqueel7-Jun-06 4:14 
QuestionRe: Socket programming error MFC Pin
David Crow7-Jun-06 4:20
David Crow7-Jun-06 4:20 
AnswerRe: Socket programming error MFC [modified] Pin
Aqueel7-Jun-06 4:32
Aqueel7-Jun-06 4:32 
QuestionRe: Socket programming error MFC [modified] Pin
David Crow7-Jun-06 4:42
David Crow7-Jun-06 4:42 
GeneralRe: Socket programming error MFC [modified] Pin
Viorel.7-Jun-06 4:55
Viorel.7-Jun-06 4:55 
GeneralRe: Socket programming error MFC [modified] Pin
Aqueel7-Jun-06 5:10
Aqueel7-Jun-06 5:10 
GeneralRe: Socket programming error MFC [modified] Pin
Viorel.7-Jun-06 5:21
Viorel.7-Jun-06 5:21 
AnswerRe: Socket programming error MFC Pin
Sarath C7-Jun-06 4:38
Sarath C7-Jun-06 4:38 
Questionneed to write a panel(a custom control) to load and unload controls? Pin
old_dustman7-Jun-06 4:11
old_dustman7-Jun-06 4:11 
QuestionRe: need to write a panel(a custom control) to load and unload controls? Pin
David Crow7-Jun-06 4:22
David Crow7-Jun-06 4:22 
QuestionRe: need to write a panel(a custom control) to load and unload controls? Pin
Jun Du7-Jun-06 5:25
Jun Du7-Jun-06 5:25 
AnswerRe: need to write a panel(a custom control) to load and unload controls? Pin
old_dustman7-Jun-06 17:11
old_dustman7-Jun-06 17:11 

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.