Click here to Skip to main content
15,916,949 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DWORD dw='pp' is valid in VC++ 6.0 :( Pin
toxcct7-Nov-07 0:23
toxcct7-Nov-07 0:23 
GeneralRe: DWORD dw='pp' is valid in VC++ 6.0 :( Pin
Raj Prathap7-Nov-07 0:30
Raj Prathap7-Nov-07 0:30 
GeneralRe: DWORD dw='pp' is valid in VC++ 6.0 :( Pin
CPallini7-Nov-07 0:44
mveCPallini7-Nov-07 0:44 
GeneralRe: DWORD dw='pp' is valid in VC++ 6.0 :( Pin
Raj Prathap21-Nov-07 4:01
Raj Prathap21-Nov-07 4:01 
GeneralYou're welcome Pin
CPallini21-Nov-07 4:24
mveCPallini21-Nov-07 4:24 
AnswerRe: DWORD dw='pp' is valid in VC++ 6.0 :( Pin
Nishad S7-Nov-07 0:35
Nishad S7-Nov-07 0:35 
AnswerRe: DWORD dw='pp' is valid in VC++ 6.0 :( Pin
Don Box7-Nov-07 0:56
Don Box7-Nov-07 0:56 
AnswerRe: DWORD dw='pp' is valid in VC++ 6.0 :( Pin
David Crow7-Nov-07 4:32
David Crow7-Nov-07 4:32 
QuestionRead Console Output Pin
nitin36-Nov-07 23:39
nitin36-Nov-07 23:39 
AnswerRe: Read Console Output Pin
Raj Prathap6-Nov-07 23:45
Raj Prathap6-Nov-07 23:45 
GeneralRe: Read Console Output Pin
Matthew Faithfull7-Nov-07 0:02
Matthew Faithfull7-Nov-07 0:02 
QuestionRe: Read Console Output Pin
David Crow7-Nov-07 4:34
David Crow7-Nov-07 4:34 
QuestionAbout Memory initialization Pin
manish.patel6-Nov-07 23:30
manish.patel6-Nov-07 23:30 
AnswerRe: About Memory initialization Pin
Raj Prathap6-Nov-07 23:52
Raj Prathap6-Nov-07 23:52 
AnswerRe: About Memory initialization Pin
jhwurmbach6-Nov-07 23:56
jhwurmbach6-Nov-07 23:56 
GeneralRe: About Memory initialization Pin
toxcct7-Nov-07 0:11
toxcct7-Nov-07 0:11 
GeneralRe: About Memory initialization Pin
jhwurmbach7-Nov-07 0:35
jhwurmbach7-Nov-07 0:35 
GeneralRe: About Memory initialization Pin
Nemanja Trifunovic7-Nov-07 3:48
Nemanja Trifunovic7-Nov-07 3:48 
GeneralRe: About Memory initialization Pin
jhwurmbach7-Nov-07 3:52
jhwurmbach7-Nov-07 3:52 
GeneralRe: About Memory initialization Pin
Nemanja Trifunovic7-Nov-07 4:17
Nemanja Trifunovic7-Nov-07 4:17 
GeneralRe: About Memory initialization Pin
Matthew Faithfull6-Nov-07 23:58
Matthew Faithfull6-Nov-07 23:58 
GeneralRe: About Memory initialization Pin
toxcct7-Nov-07 0:13
toxcct7-Nov-07 0:13 
AnswerRe: About Memory initialization Pin
toxcct7-Nov-07 0:08
toxcct7-Nov-07 0:08 
AnswerRe: About Memory initialization Pin
John R. Shaw7-Nov-07 0:56
John R. Shaw7-Nov-07 0:56 
Ahaaa! Use STL instead!

Seriously use the STL, unless you have a good reason not too. The little code line you showed is equivalent to “char* str = (char*)malloc(n)” in C code. Use std::string instead of that and ignore the internal details (life gets complicated there).

I love C, but you have to learn to separate the concepts that apply to C from those that apply to C++.

If you use the STL liberally, then you will rarely need to allocate memory directly.


INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

QuestionHow to make a connection to MySQL in MFC? Pin
TooShy2Talk6-Nov-07 23:15
TooShy2Talk6-Nov-07 23: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.