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

C / C++ / MFC

 
AnswerRe: Create an incoming connection RAS server with C++ Pin
Erudite_Eric23-May-12 22:09
Erudite_Eric23-May-12 22:09 
GeneralRe: Create an incoming connection RAS server with C++ Pin
Member 800297324-May-12 5:55
Member 800297324-May-12 5:55 
QuestionCTabCtrl and CRuntimeClass - is there a better way? Pin
Vaclav_23-May-12 6:08
Vaclav_23-May-12 6:08 
AnswerRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Aescleal23-May-12 6:47
Aescleal23-May-12 6:47 
GeneralRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Vaclav_23-May-12 7:42
Vaclav_23-May-12 7:42 
GeneralRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Vaclav_23-May-12 10:29
Vaclav_23-May-12 10:29 
GeneralRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Aescleal23-May-12 23:46
Aescleal23-May-12 23:46 
GeneralRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Aescleal23-May-12 23:57
Aescleal23-May-12 23:57 
I understand your point, but if your code had been written:
C++
CRuntimeClass *rtClass = GetChildViewsRuntimeClass( this );

if( rtClass->className == "first view class" )
{
    DisconnectFirstViewClassControlThingy( this );
}
else if ( rtClass->className == "second view class" )
{
    DisconnectSecondViewClassControlThingy( this );
}
Then most C++ programmers would have looked at that and said - "Ah ha, switching on a type field, there's a missing virtual function..." As it was I had to mentally extract the salient points to suggest the change I did.

Basically always write code to be read by other people - they don't know the problem you're trying to solve so making things as easy to read as possible helps them help you.

Cheers,

Ash

PS: And if you ever see any code I write on code project that you think could be clearer, please tell me! I can either explain it better preferably by rewriting it or explaining it better for neophytes that don't know the language or its idioms yet. I'm always trying to learn and only occasionally does the criticism hurt Smile | :) .
GeneralRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Vaclav_24-May-12 3:39
Vaclav_24-May-12 3:39 
GeneralRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Vaclav_24-May-12 7:31
Vaclav_24-May-12 7:31 
Questionnew and free Pin
pix_programmer23-May-12 0:23
pix_programmer23-May-12 0:23 
AnswerRe: new and free Pin
CPallini23-May-12 1:00
mveCPallini23-May-12 1:00 
GeneralRe: new and free Pin
pix_programmer23-May-12 1:13
pix_programmer23-May-12 1:13 
GeneralRe: new and free Pin
CPallini23-May-12 1:48
mveCPallini23-May-12 1:48 
AnswerRe: new and free Pin
«_Superman_»23-May-12 4:54
professional«_Superman_»23-May-12 4:54 
QuestionUnable to write to shared memory Pin
manoharbalu22-May-12 20:20
manoharbalu22-May-12 20:20 
AnswerRe: Unable to write to shared memory Pin
Malli_S22-May-12 20:34
Malli_S22-May-12 20:34 
GeneralRe: Unable to write to shared memory Pin
manoharbalu22-May-12 22:40
manoharbalu22-May-12 22:40 
AnswerRe: Unable to write to shared memory Repost Pin
Richard MacCutchan22-May-12 22:34
mveRichard MacCutchan22-May-12 22:34 
GeneralRe: Unable to write to shared memory Repost Pin
Richard Andrew x6423-May-12 12:08
professionalRichard Andrew x6423-May-12 12:08 
QuestionSyncronisation problem Pin
VCProgrammer22-May-12 20:13
VCProgrammer22-May-12 20:13 
AnswerRe: Syncronisation problem Pin
Malli_S22-May-12 20:45
Malli_S22-May-12 20:45 
AnswerRe: Syncronisation problem Pin
Erudite_Eric22-May-12 21:52
Erudite_Eric22-May-12 21:52 
AnswerRe: Syncronisation problem Pin
Richard MacCutchan22-May-12 22:33
mveRichard MacCutchan22-May-12 22:33 
AnswerRe: Syncronisation problem Pin
ThatsAlok23-May-12 3:55
ThatsAlok23-May-12 3:55 

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.