Click here to Skip to main content
15,888,803 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can I create a working thread in a MFC regular dll Pin
Iain Clarke, Warrior Programmer9-Nov-08 22:25
Iain Clarke, Warrior Programmer9-Nov-08 22:25 
GeneralRe: How can I create a working thread in a MFC regular dll Pin
W.Kim 198710-Nov-08 3:06
W.Kim 198710-Nov-08 3:06 
GeneralRe: How can I create a working thread in a MFC regular dll Pin
Mark Salsbery10-Nov-08 4:53
Mark Salsbery10-Nov-08 4:53 
GeneralRe: How can I create a working thread in a MFC regular dll Pin
Mark Salsbery10-Nov-08 5:00
Mark Salsbery10-Nov-08 5:00 
QuestionPointer symbol position and constant member functions Pin
Christian Flutcher8-Nov-08 16:55
Christian Flutcher8-Nov-08 16:55 
AnswerRe: Pointer symbol position and constant member functions Pin
Saurabh.Garg8-Nov-08 18:55
Saurabh.Garg8-Nov-08 18:55 
GeneralRe: Pointer symbol position and constant member functions Pin
Christian Flutcher9-Nov-08 5:35
Christian Flutcher9-Nov-08 5:35 
AnswerRe: Pointer symbol position and constant member functions Pin
toxcct9-Nov-08 3:05
toxcct9-Nov-08 3:05 
you have an interview, don't you ? Smile | :)


Christian Flutcher wrote:
1 - Which is the preferred way of using the pointer symbol ?


for me, I like to declare every variable separatedly, and I don't like to mix declarations of different types.
this way, I prefer using int* pi; syntax because I see immediately that pi is of type int*.


Christian Flutcher wrote:
2 - Is it a good practice to append const with member function that doesn't modify any member variables?


definitely, yes !
because the one who write the class is not always the one who will use it, a class definition has to be clear, and has to mean what the class is designed for.
When you have an accessor which just does a "get", the it's obviously not modifying the object, and should be declared as const.


Christian Flutcher wrote:
I understand why const member functions exists. But if we are not planning to make the class object as constant,


humm, it seems to me that you don't fully understand the thing.
making a function member constant doesn't mean every function members have to be consts, and it doesn't mean either that the object will be used as a constant.
If you'd like to say that the object is used as a constant, then you would have to do like this :
<font color="blue">class</font> foo { ... };
 
<font color="blue">const</font> foo f(<font color="green">/* some initialization parameters */</font>);



GeneralRe: Pointer symbol position and constant member functions Pin
Christian Flutcher9-Nov-08 5:30
Christian Flutcher9-Nov-08 5:30 
AnswerRe: Pointer symbol position and constant member functions Pin
Iain Clarke, Warrior Programmer9-Nov-08 4:04
Iain Clarke, Warrior Programmer9-Nov-08 4:04 
GeneralRe: Pointer symbol position and constant member functions Pin
Christian Flutcher9-Nov-08 5:32
Christian Flutcher9-Nov-08 5:32 
QuestionHow to format like this 123,456,789.00? Pin
followait8-Nov-08 16:05
followait8-Nov-08 16:05 
AnswerRe: How to format like this 123,456,789.00? Pin
Saurabh.Garg8-Nov-08 18:57
Saurabh.Garg8-Nov-08 18:57 
GeneralRe: How to format like this 123,456,789.00? Pin
followait8-Nov-08 19:41
followait8-Nov-08 19:41 
AnswerRe: How to format like this 123,456,789.00? Pin
Randor 8-Nov-08 19:00
professional Randor 8-Nov-08 19:00 
AnswerRe: How to format like this 123,456,789.00? Pin
Hamid_RT8-Nov-08 20:22
Hamid_RT8-Nov-08 20:22 
QuestionWhy dosen't ShellExecute run some of commands? Pin
Joseph Marzbani8-Nov-08 9:26
Joseph Marzbani8-Nov-08 9:26 
AnswerRe: Why dosen't ShellExecute run some of commands? Pin
Mark Salsbery8-Nov-08 13:43
Mark Salsbery8-Nov-08 13:43 
AnswerRe: Why dosen't ShellExecute run some of commands? Pin
Joseph Marzbani8-Nov-08 16:56
Joseph Marzbani8-Nov-08 16:56 
GeneralRe: Why dosen't ShellExecute run some of commands? Pin
toxcct9-Nov-08 2:53
toxcct9-Nov-08 2:53 
GeneralRe: Why dosen't ShellExecute run some of commands? Pin
Mark Salsbery9-Nov-08 6:10
Mark Salsbery9-Nov-08 6:10 
QuestionGet the lparam of a SETTEXT hook message Pin
ignacio rivera8-Nov-08 8:00
ignacio rivera8-Nov-08 8:00 
AnswerRe: Get the lparam of a SETTEXT hook message Pin
AtomAnt10-Nov-08 8:08
AtomAnt10-Nov-08 8:08 
QuestionHow to Display a SDI Application Started with main window hidden Pin
vikrant kpr8-Nov-08 7:09
vikrant kpr8-Nov-08 7:09 
AnswerRe: How to Display a SDI Application Started with main window hidden Pin
Mark Salsbery8-Nov-08 8:07
Mark Salsbery8-Nov-08 8:07 

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.