Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5956681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:17:31+00:00 2026-05-22T18:17:31+00:00

Possible Duplicate: What is the difference between a concrete class and an abstract class?

  • 0

Possible Duplicate:
What is the difference between a concrete class and an abstract class?

I was coding something in Visual C++ 2008 doing an exercise in a book I am reading when I held my cursor over one of the classes and it told me it was an abstract class. Now I know it is an abstract class as that is what this exercise is about but I was curious as to what lets the Intelisense thing know that it is an abstract class.

I did a little homework and found that it may have been the fact that I have two virtual functions in this class and one of them is a pure virtual.

Is the pure virtual a dead giveaway or are there other things that would tell you you are dealing with or looking at an abstract class?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:17:32+00:00Added an answer on May 22, 2026 at 6:17 pm

    Is the pure virtual a dead giveaway

    In C++, yes. Since it has no abstract keyword or equivalent, the common idiom to make a class abstract is to declare a pure virtual function in it (which prevents instantiation).*

    For this same reason, in C++ there is not much difference between an interface and an abstract class – a C++ interface is simply a class containing only pure virtual functions.

    *Update: Another way to prevent instantiation of a class is to declare its constructor(s) protected or private. The latter means it can’t be subclassed either, but the former doesn’t prevent subclassing, so in theory a protected constructor could also be a sign of an abstract class a way to force subclassing. However, I have never seen this in practice. I believe this is because an abstract class is designed to be extended, which in practice almost always means it has virtual functions. And the reason why we want it to be abstract is because some part of its implementation is not yet known, hence it is to be defined in its subclass(es). Which is exactly what a pure virtual function is meant for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Difference between pointer variable and reference variable in C++ I am reading
Possible Duplicate: What is the difference between "typename" and "class" template parameters? When defining
Possible Duplicate: Difference between static class and singleton pattern? I'm thinking about the choice
Possible Duplicate: Difference between static class and singleton pattern? we use static class for
Possible Duplicate: Difference between static class and singleton pattern? Which is better in Java,
Possible Duplicate: Difference between Property and Field in C# public class Test { public
Possible Duplicate: Difference between pointer variable and reference variable in C++ When should I
Possible Duplicate: What is the difference between a delegate and events? Possible Duplicate: Difference
Possible Duplicate: Ruby: difference between || and ‘or’ Using Ruby || and or are
Possible Duplicate: What is the difference between String.Empty and “” Is equivalent to String.Empty

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.