Results 1 to 4 of 4

Thread: Virtual overridden function must be implemented in header?

Threaded View

  1. #1

    Thread Starter
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339

    Virtual overridden function must be implemented in header?

    Lets say:

    class A {
    public:
    virtual void foo() = 0;
    };

    class B : public A {
    void foo();
    }


    Now MUST foo()'s implimentation for class 'B' be written in the header?
    It seems I have having unresolved external symbols if I try to declare them in a source file.
    Last edited by Halsafar; Feb 1st, 2006 at 04:19 PM.
    "From what was there, and was meant to be, but not of that was faded away." - - Steve Damm

    "The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm

    "When you do things right, people won't be sure if you did anything at all." - - God from Futurama

Posting Permissions

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



Click Here to Expand Forum to Full Width