CFanatic

Go Back   CFanatic > Programming > C++ Programming


Prev Previous Post   Next Post Next
  #1  
Old 04-12-2009, 07:31 AM
Junior Member
 
Join Date: Sep 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Alex is on a distinguished road
| More
Thumbs up How to enforce a virtual fn is overloaded by derived class?

Hi All,
I need to enforce requirement that the programmer overloads a particular
virtual function in all derived classes.
i.e.
class base {
public:
virtual void foo() {} // base has some handler
class deriv1 : public base {
void foo() {} // good overridden
class deriv2 : public base {
I am using VS2008 (VC9) (not /clr) so it adheres to _some_ of the standard
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
get Class johny10151981 Win32 Programming 1 10-07-2008 03:58 AM
Virtual Functions and pointers Spogliani C++ Programming 1 07-15-2008 01:58 AM
operator+ in derived classes More options JimLangston C++ Programming 0 03-30-2007 01:17 AM
overloaded operators question JRM C++ Programming 0 12-31-2006 12:19 AM
changing variable types of a function of a derived class mrclash C# Programming 0 09-20-2006 04:56 AM

 

Follow CFanatic on Twitter
CFanatic Search
Custom Search

Advertisement

Go4Expert's Job Board
Powered by

Go4Expert Newsletter
Enter your Name and Email Address below and Click Subscribe.

Subscriber Counter

Not planning to subscribe yet, browse Go4Expert's Newsletter Archive

All times are GMT -5. The time now is 06:35 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Looking for work in C, C++, C#? Sign up at Elance and search over 30,000 Freelancing jobs today.