Click here to Skip to main content
15,906,708 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to read words from a notepad application in VC++ program Pin
YaronNir25-Apr-06 4:08
YaronNir25-Apr-06 4:08 
AnswerRe: How to read words from a notepad application in VC++ program Pin
Aqueel25-Apr-06 4:09
Aqueel25-Apr-06 4:09 
GeneralRe: How to read words from a notepad application in VC++ program Pin
Cedric Moonen25-Apr-06 4:44
Cedric Moonen25-Apr-06 4:44 
GeneralRe: How to read words from a notepad application in VC++ program Pin
lekshmipriya25-Apr-06 4:57
lekshmipriya25-Apr-06 4:57 
GeneralRe: How to read words from a notepad application in VC++ program Pin
Eytukan25-Apr-06 5:03
Eytukan25-Apr-06 5:03 
GeneralRe: How to read words from a notepad application in VC++ program Pin
Cedric Moonen25-Apr-06 5:05
Cedric Moonen25-Apr-06 5:05 
GeneralRe: How to read words from a notepad application in VC++ program Pin
Aqueel25-Apr-06 17:26
Aqueel25-Apr-06 17:26 
GeneralRe: How to read words from a notepad application in VC++ program Pin
Cedric Moonen25-Apr-06 20:22
Cedric Moonen25-Apr-06 20:22 
Aqueel wrote:
Yes it is but i dont know any other way to do it


Use new instead of malloc:

name = new char[size + 1];

For char arrays, there is no difference but if you use arrays of classes, then definitively you should use new instead of malloc. malloc will only allocate the memory and when you release it, it will just free the memory. With new and delete, the constructor and destructor of your class will be called which allows you to put some initialization and some clean-up code in your object. This is a much more object-oriented way of working.

Aqueel wrote:
Can you please tell me what could be the problems when we mix c and c++?


There won't be any problems (or at least not that I'm aware of). It is more to have your code to be consistent. That's why I said it wan't very important Wink | ;) .
GeneralRe: How to read words from a notepad application in VC++ program Pin
Aqueel26-Apr-06 3:27
Aqueel26-Apr-06 3:27 
QuestionRe: How to read words from a notepad application in VC++ program Pin
lekshmipriya25-Apr-06 16:21
lekshmipriya25-Apr-06 16:21 
QuestionRe: How to read words from a notepad application in VC++ program Pin
Eytukan25-Apr-06 4:53
Eytukan25-Apr-06 4:53 
AnswerRe: How to read words from a notepad application in VC++ program Pin
lekshmipriya25-Apr-06 5:03
lekshmipriya25-Apr-06 5:03 
GeneralRe: How to read words from a notepad application in VC++ program Pin
Eytukan25-Apr-06 5:28
Eytukan25-Apr-06 5:28 
AnswerRe: How to read words from a notepad application in VC++ program Pin
Cedric Moonen25-Apr-06 5:08
Cedric Moonen25-Apr-06 5:08 
Questiondemo exe in web site Pin
akram mirzaei25-Apr-06 3:30
akram mirzaei25-Apr-06 3:30 
AnswerRe: demo exe in web site Pin
Aqueel25-Apr-06 3:50
Aqueel25-Apr-06 3:50 
GeneralRe: demo exe in web site Pin
David Crow25-Apr-06 4:08
David Crow25-Apr-06 4:08 
GeneralRe: demo exe in web site Pin
Rilhas25-Apr-06 7:14
Rilhas25-Apr-06 7:14 
GeneralRe: demo exe in web site Pin
David Crow25-Apr-06 9:44
David Crow25-Apr-06 9:44 
GeneralRe: demo exe in web site Pin
Aqueel25-Apr-06 17:39
Aqueel25-Apr-06 17:39 
GeneralRe: demo exe in web site Pin
David Crow26-Apr-06 2:46
David Crow26-Apr-06 2:46 
GeneralRe: demo exe in web site Pin
akram mirzaei28-Apr-06 20:18
akram mirzaei28-Apr-06 20:18 
GeneralRe: demo exe in web site Pin
Rilhas28-Apr-06 23:13
Rilhas28-Apr-06 23:13 
GeneralRe: demo exe in web site Pin
Aqueel25-Apr-06 17:16
Aqueel25-Apr-06 17:16 
AnswerRe: demo exe in web site Pin
Cedric Moonen25-Apr-06 4:46
Cedric Moonen25-Apr-06 4:46 

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.