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 8642957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:54:41+00:00 2026-06-12T11:54:41+00:00

Alright, I’ve got what should be an easy question but there are literally no

  • 0

Alright, I’ve got what should be an easy question but there are literally no examples of what I am looking for online, only copies of the same example which does everything in one file. I’m trying to make an interface and a method to use it like the example below, but I am getting unresolved external symbol errors from visual studio when I compile. Any ideas about what I am doing wrong?

IFoo.h

class IFoo {
public:
    virutal int Bar();
}

Foo.h

class Foo : public IFoo {
    virtual int Bar();
}

Foo.cpp

int Foo::Bar() {
    return 1;
}
  • 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-06-12T11:54:42+00:00Added an answer on June 12, 2026 at 11:54 am

    In IFoo.h, the virtual method must be pure virtual:

    class IFoo {
    public:
        virtual int Bar() = 0;
    };
    

    Alternately, provide an default implementation, either inline or in an IFoo.cpp. However, that would make the I prefix misleading, as it wouldn’t act like an interface, then.

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

Sidebar

Related Questions

Alright, this is driving me nuts because my regex is working on Rubular, but
Alright so I have no idea how to even begin doing this But basically
Alright so I have been looking around (on SO and Google) to see if
Alright, so I got this code for gluLookAt: lookAt = new Vector3f(-player.pos.x, -player.pos.y, -player.pos.z);
Alright, hoping someone can help. I've got a page used to search for employees.
Alright, I'm extremely new to programming so odds are this is a really easy
Alright. This may be difficult but I have been struggling for quite a bit
Alright I've been debugging the whole day but can't figure out what the problem
Alright here is the thing, I have this site that was once wordpress but
Alright, quick question. A server is running in Eastern Time. PHP program needs to

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.