I am researching C++ inside a class at this time and that i don't quite grok pure virtual functions. I realize that they're later layed out inside a derived class, why would you need to declare it as being comparable to if you're just likely to define it within the derived class?

Briefly, it's to create the course abstract, to ensure that it cannot be instantiated, but a young child class can override the pure virtual techniques to create a concrete class. This is an excellent method to define an interface in C++.

This forces a derived class to define the function.

Any class that contains a pure virtual method is going to be abstract, that's, it can't be instantiated. Abstract courses are helpful for determining some core behavior that subclasses should share, but permitting (actually, needing) subclasses to implement the abstract individually.

A good example of an abstract class:

class Foo {

    // pure virtual, must be implemented by subclasses
    virtual public void myMethod() = 0;

    // normal method, will be available to all subclasses,
    // but *can* be overridden
    virtual public void myOtherMethod();
};

A category by which every technique is abstract can be used an interface, needing all subclasses to adapt towards the interface by applying all techniques found in it.

A good example of an interface:

class Bar {

    // all method are pure virtual; subclasses must implement
    // all of them
    virtual public void myMethod() = 0;

    virtual public void myOtherMethod() = 0;
};

Pure virtual techniques in C++ are essentially a method to define connects without needing these to be implemented.

To increase Steven Sudit's answer:

"Briefly, it's to create the course abstract, to ensure that it cannot be instantiated, but a young child class can override the pure virtual techniques to create a concrete class. This is an excellent method to define an interface in C++."

A good example of this is should you have had basics class (possibly Shape) that you employ to define numerous member functions that it is derived classes may use, but wish to prevent a clear case of Shape being declared and pressure customers to make use of just the derived classes (which might be, Rectangle, Triangular, Government, and so forth)

RE: Jeff's answer above

Non-abstract classes can contain virtual member functions and become instantiated. Actually, for over-loading member functions this really is needed as automatically C++ does not determine the runtime kind of a flexible, however when defined using th virtual keyword, it'll.

Think about this code (note, accessors, mutators, constructors, etc aren't incorporated with regard to clearness):

class Person{
  int age;

  public:
    virtual void print(){
      cout << age <<endl;
    }
}

class Student: public Person{
  int studentID

  public:
    void print(){
      cout << age << studentID <<endl;
    }
}

Now when running this code:

 Person p = new Student();
 p.print();

with no virtual keyword, just the age could be printed, not age and studentID out of the box designed to happen for that Student class

(this situation is dependant on a really similar one from c++ for java developers http://www.amazon.com/Java-Programmers-Mark-Allen-Weiss/dp/013919424X )

@Steven Sudit: you're completely correct, I forgot to range from the actual inheritance, doh! The accessors etc aren't incorporated to help keep things clearer, and I have made more apparent now. 3-7-09: all fixed