Click here to Skip to main content
15,915,019 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionchar buf Pin
Smith#11-Jan-06 3:04
Smith#11-Jan-06 3:04 
AnswerRe: char buf Pin
sunit511-Jan-06 3:09
sunit511-Jan-06 3:09 
AnswerRe: char buf Pin
benjymous11-Jan-06 3:22
benjymous11-Jan-06 3:22 
GeneralRe: char buf Pin
Smith#11-Jan-06 3:30
Smith#11-Jan-06 3:30 
GeneralRe: char buf Pin
benjymous11-Jan-06 7:30
benjymous11-Jan-06 7:30 
GeneralRe: char buf Pin
Eytukan11-Jan-06 3:43
Eytukan11-Jan-06 3:43 
AnswerRe: char buf Pin
Nish Nishant11-Jan-06 3:59
sitebuilderNish Nishant11-Jan-06 3:59 
AnswerRe: char buf Pin
vipinasda11-Jan-06 4:43
vipinasda11-Jan-06 4:43 
Use string or MFC CString.

Using them would help you in all of this:-
1) Don't have to bother about freeing memory after usage.
2) Potential crashes by working directly with pointers and possible
buffer overflows.

Both of them become issues when you write a program which would grow into several 1000 lines of code and ultimately end up in ugly event of crashes
on customer machines.

As part of coding style, make them part of your company or personal coding
practice and follow them from the day one you start working on a project.

If not followed you would endup in unmaintainable code, with memory
allocations at one place and deallocation a mile away.memory leaks and troubles which could be avoided at first place. That's were c++ comes to
your rescue, use them to the fullest wherever you can.



Vipin - MVP
AnswerRe: char buf Pin
lemur211-Jan-06 4:50
lemur211-Jan-06 4:50 
GeneralRe: char buf Pin
Sebastian Schneider11-Jan-06 5:12
Sebastian Schneider11-Jan-06 5:12 
AnswerRe: char buf Pin
Sebastian Schneider11-Jan-06 5:10
Sebastian Schneider11-Jan-06 5:10 
AnswerAnswer!! Pin
Eytukan11-Jan-06 5:25
Eytukan11-Jan-06 5:25 
AnswerRe: char buf Pin
Bob Stanneveld11-Jan-06 10:31
Bob Stanneveld11-Jan-06 10:31 
GeneralRe: char buf Pin
Tim Smith11-Jan-06 11:52
Tim Smith11-Jan-06 11:52 
GeneralRe: char buf Pin
Bob Stanneveld12-Jan-06 22:19
Bob Stanneveld12-Jan-06 22:19 
AnswerRe: char buf Pin
Stephen Hewitt11-Jan-06 15:34
Stephen Hewitt11-Jan-06 15:34 
QuestionPermissions and fopen Pin
Chris Meech11-Jan-06 3:02
Chris Meech11-Jan-06 3:02 
AnswerRe: Permissions and fopen Pin
vipinasda11-Jan-06 4:53
vipinasda11-Jan-06 4:53 
GeneralRe: Permissions and fopen Pin
Chris Meech11-Jan-06 6:17
Chris Meech11-Jan-06 6:17 
GeneralRe: Permissions and fopen Pin
__yb11-Jan-06 11:36
__yb11-Jan-06 11:36 
GeneralRe: Permissions and fopen Pin
vipinasda11-Jan-06 16:23
vipinasda11-Jan-06 16:23 
GeneralRe: Permissions and fopen Pin
__yb11-Jan-06 23:52
__yb11-Jan-06 23:52 
QuestionON_NOTIFY_RANGE and Textbox's KillFocus Pin
Sarvan AL11-Jan-06 2:31
Sarvan AL11-Jan-06 2:31 
AnswerRe: ON_NOTIFY_RANGE and Textbox's KillFocus Pin
Cedric Moonen11-Jan-06 2:33
Cedric Moonen11-Jan-06 2:33 
AnswerRe: ON_NOTIFY_RANGE and Textbox's KillFocus Pin
FarPointer11-Jan-06 3:15
FarPointer11-Jan-06 3:15 

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.