Click here to Skip to main content
15,897,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to execute tab and newline? Pin
Sauro Viti22-Jul-10 7:21
professionalSauro Viti22-Jul-10 7:21 
GeneralRe: How to execute tab and newline? Pin
Joseph8222-Jul-10 9:49
Joseph8222-Jul-10 9:49 
QuestionDesingning a Dialog Box's and forms Pin
rrthangavel22-Jul-10 3:58
rrthangavel22-Jul-10 3:58 
AnswerRe: Desingning a Dialog Box's and forms Pin
Maximilien22-Jul-10 5:15
Maximilien22-Jul-10 5:15 
AnswerRe: Desingning a Dialog Box's and forms Pin
rp_suman22-Jul-10 5:57
rp_suman22-Jul-10 5:57 
GeneralRe: Desingning a Dialog Box's and forms Pin
Niklas L22-Jul-10 6:20
Niklas L22-Jul-10 6:20 
GeneralRe: Desingning a Dialog Box's and forms Pin
rrthangavel22-Jul-10 23:30
rrthangavel22-Jul-10 23:30 
Questioninheritance question Pin
lune1222-Jul-10 3:37
lune1222-Jul-10 3:37 
Hi,

I need to update a code that was written a long time ago, and have some problem.
my question is as follow.

I have a Base class with function f1 that do something.
the Derived class ovveride function f1 and do other thing.

now I need to add to the derived class a function f2 that do exactly what Base::f1() is doing.
and I dont want to duplicate the code (of course)

is it OK to do:
void Derived::f2()
{
  Base::f1();
}


or is there a better way to call the f1 from the base class?

Many thanks,
AnswerRe: inheritance question Pin
Niklas L22-Jul-10 4:54
Niklas L22-Jul-10 4:54 
AnswerRe: inheritance question Pin
Aescleal22-Jul-10 5:11
Aescleal22-Jul-10 5:11 
GeneralRe: inheritance question Pin
Niklas L22-Jul-10 6:03
Niklas L22-Jul-10 6:03 
GeneralRe: inheritance question Pin
Moak22-Jul-10 14:30
Moak22-Jul-10 14:30 
GeneralRe: inheritance question Pin
Aescleal22-Jul-10 20:15
Aescleal22-Jul-10 20:15 
GeneralRe: inheritance question Pin
Moak23-Jul-10 0:25
Moak23-Jul-10 0:25 
GeneralRe: inheritance question Pin
Niklas L22-Jul-10 22:44
Niklas L22-Jul-10 22:44 
GeneralRe: inheritance question Pin
Aescleal22-Jul-10 20:17
Aescleal22-Jul-10 20:17 
GeneralRe: inheritance question Pin
Niklas L22-Jul-10 23:11
Niklas L22-Jul-10 23:11 
GeneralRe: inheritance question Pin
Aescleal23-Jul-10 4:13
Aescleal23-Jul-10 4:13 
GeneralRe: inheritance question Pin
Niklas L23-Jul-10 11:36
Niklas L23-Jul-10 11:36 
GeneralRe: inheritance question Pin
Aescleal23-Jul-10 19:36
Aescleal23-Jul-10 19:36 
Questionhow to play audio and video Pin
MKC00222-Jul-10 3:11
MKC00222-Jul-10 3:11 
AnswerRe: how to play audio and video Pin
Cool_Dev22-Jul-10 3:19
Cool_Dev22-Jul-10 3:19 
GeneralRe: how to play audio and video Pin
MKC00222-Jul-10 23:18
MKC00222-Jul-10 23:18 
GeneralRe: how to play audio and video Pin
Cool_Dev3-Aug-10 2:24
Cool_Dev3-Aug-10 2:24 
QuestionMaking a driver WITHOUT wdf [Solved myself!] Pin
Iain Clarke, Warrior Programmer22-Jul-10 2:51
Iain Clarke, Warrior Programmer22-Jul-10 2:51 

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.