Thread: super/interface keywords

  1. #1
    Registered User
    Join Date
    Jun 2004

    super/interface keywords

    I learned object oriented programming with java, and in java super and interface keywords exist. But I've never come across those kewords in a C++ source. Yet.. I have the doubt. Are those keywords standard or only another of VC++ add-ons ?!?

  2. #2
    Registered User
    Join Date
    Apr 2003
    Well, that's because C++ doesn't have interfaces--it has multiple inheritance, and calling a base class constructor is not done with super().

  3. #3
    Registered User
    Join Date
    Jun 2004
    if I ever need that (big hierarchy tree) I think I'll use
    #undef interface
    #ifndef _MSC_VER
    #define interface class
    #pragma keyword("interface", on)

  4. #4
    Registered User
    Join Date
    Jan 2005
    They are VC++ add-ons.

  5. #5
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    You can have the same effects in C++, but those are not keywords.

    If you want an interface, create an abstract data type (which is a class that has pure virtual functions -- although, it can have implemented functions too).

    For calling the base class constructor, you must do this in the initializer list.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to color certain keywords?
    By Purity in forum Tech Board
    Replies: 5
    Last Post: 10-20-2005, 02:07 PM
  2. Google remembering my keywords
    By m712 in forum Tech Board
    Replies: 4
    Last Post: 07-26-2003, 11:48 AM
  3. top keywords of the day
    By dP munky in forum A Brief History of
    Replies: 9
    Last Post: 02-28-2003, 12:43 PM
  4. new keywords
    By Shadow12345 in forum C++ Programming
    Replies: 8
    Last Post: 07-25-2002, 02:57 AM
  5. C# Keywords
    By Troll_King in forum A Brief History of
    Replies: 2
    Last Post: 10-28-2001, 11:00 AM