Click here to Skip to main content
15,895,656 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Named Pipes buffer problem (Win32) Pin
vga210-Sep-06 22:36
vga210-Sep-06 22:36 
QuestionRPC Authentication won't work Pin
Mr.Brainley8-Sep-06 2:13
Mr.Brainley8-Sep-06 2:13 
AnswerRe: RPC Authentication won't work Pin
Programm3r8-Sep-06 2:20
Programm3r8-Sep-06 2:20 
GeneralRe: RPC Authentication won't work Pin
Mr.Brainley8-Sep-06 2:39
Mr.Brainley8-Sep-06 2:39 
GeneralRe: RPC Authentication won't work Pin
Programm3r8-Sep-06 2:43
Programm3r8-Sep-06 2:43 
Questionerror C2248: cannot access protected member declared in class 'CEmployee' Pin
jon-808-Sep-06 1:51
professionaljon-808-Sep-06 1:51 
AnswerRe: error C2248: cannot access protected member declared in class 'CEmployee' Pin
prasad_som8-Sep-06 2:04
prasad_som8-Sep-06 2:04 
AnswerRe: error C2248: cannot access protected member declared in class 'CEmployee' Pin
David Crow8-Sep-06 3:18
David Crow8-Sep-06 3:18 
I think you want a virtual method instead:

class CEmployee
{
public:
    virtual void CalcSalary( void ){}
 
protected:
    float m_HourlyRate;
    float m_HoursWorked;
};
 
class CAccountant : protected CEmployee
{
    public:
        void CalcSalary( void )
        {
            m_HourlyRate  = 50.0;
            m_HoursWorked = 1.0;
        };
};



"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.

"Judge not by the eye but by the heart." - Native American Proverb


AnswerRe: error C2248: cannot access protected member declared in class 'CEmployee' Pin
Zac Howland8-Sep-06 4:12
Zac Howland8-Sep-06 4:12 
QuestionShow character from number? [modified] Pin
bosfan8-Sep-06 1:39
bosfan8-Sep-06 1:39 
QuestionRe: Show character from number? [modified] Pin
prasad_som8-Sep-06 2:15
prasad_som8-Sep-06 2:15 
AnswerRe: Show character from number? Pin
bosfan8-Sep-06 3:53
bosfan8-Sep-06 3:53 
GeneralRe: Show character from number? Pin
prasad_som8-Sep-06 5:34
prasad_som8-Sep-06 5:34 
Questioncheckbox selection Pin
_tasleem8-Sep-06 1:05
_tasleem8-Sep-06 1:05 
AnswerRe: checkbox selection Pin
Hamid_RT8-Sep-06 1:11
Hamid_RT8-Sep-06 1:11 
GeneralRe: checkbox selection Pin
_tasleem8-Sep-06 1:28
_tasleem8-Sep-06 1:28 
AnswerRe: checkbox selection Pin
Rinu_Raj8-Sep-06 1:16
Rinu_Raj8-Sep-06 1:16 
QuestionRe: checkbox selection Pin
David Crow8-Sep-06 3:13
David Crow8-Sep-06 3:13 
QuestionFinding deleted virtual keywords Pin
manustone8-Sep-06 0:56
manustone8-Sep-06 0:56 
AnswerRe: Finding deleted virtual keywords Pin
Steen Krogsgaard8-Sep-06 3:51
Steen Krogsgaard8-Sep-06 3:51 
QuestionAdding buttons in title bar Pin
pc_dev8-Sep-06 0:54
pc_dev8-Sep-06 0:54 
AnswerRe: Adding buttons in title bar Pin
Hamid_RT8-Sep-06 1:08
Hamid_RT8-Sep-06 1:08 
GeneralRe: Adding buttons in title bar Pin
pc_dev8-Sep-06 1:49
pc_dev8-Sep-06 1:49 
QuestionOffice automation Pin
Wim Engberts8-Sep-06 0:27
Wim Engberts8-Sep-06 0:27 
AnswerRe: Office automation Pin
led mike8-Sep-06 4:38
led mike8-Sep-06 4:38 

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.