Results 1 to 2 of 2

Thread: What is the difference between the Interface and Abstract base class in C++?

  1. #1
    Senior Member suve's Avatar
    Join Date
    Jun 2012
    Posts
    441

    What is the difference between the Interface and Abstract base class in C++?

    Hello all,

    Here is one of the important FAQ for C++ users.

    What is the difference between the Interface and Abstract base class in C++?

    Please give the answers with examples for more help..

    Thanks

  2. #2
    Senior Member Tarah's Avatar
    Join Date
    Jun 2012
    Posts
    300
    Here is the brief description about the above two

    Interfaces
    The interface provides the definitions of methods that must be implemented by a class.

    Purpose
    The major use of the interfaces is to allow you to generalize the specific functionality regardless of implementation.

    Abstract classes
    These are the base classes that contain some abstract methods.

    They cannot be instantiated they are to be derived from.

    Purpose
    The use of an Abstract class is to allow you to define some generic functionality and sub-class to implement more specific functionality where appropriate.

Similar Threads

  1. Replies: 0
    Last Post: 02-25-2013, 06:20 AM
  2. Example code to create the Abstract class in C++
    By sarvani in forum C, CPP Programs
    Replies: 0
    Last Post: 02-25-2013, 06:16 AM
  3. Example for abstract base class in c++
    By sarvani in forum C, CPP Programs
    Replies: 0
    Last Post: 02-25-2013, 05:14 AM
  4. Replies: 0
    Last Post: 02-25-2013, 04:11 AM
  5. Replies: 0
    Last Post: 08-27-2012, 09:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •