John Denker writes:

> On 03/03/2007 12:32 PM, Melchior FRANZ wrote:
>
>>   hxx:
>>     +        virtual void Init();
>>   cxx:
>>     +void FGATC::Init() {
>>     +// This should never be called, since each derived class will have its 
>> own
>>     +// Init() that overrides this one.
>>     +}
>> 
>> So, why are you adding it?!
>
> Perhaps because the code wouldn't be correct without it?!

then make in a pure virtual function in the header file.

     virtual void Init()=0;

this way every derived class will have to implement it but there is no
definition in the base class.

--alex--

-- 
| I believe the moment is at hand when, by a paranoiac and active |
|  advance of the mind, it will be possible (simultaneously with  |
|  automatism and other passive states) to systematize confusion  |
|  and thus to help to discredit completely the world of reality. |

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to