Possible Duplicate:
What is forward declaration in c++?
I just have a question about what a piece of code is doing in this simple example. I've looked up friend classes and understand how they work, but I don't understand what the class declaration at the top is actually doing (i.e. Robot). Does this just mean that the Happy class can use Robot objects but they can't access its private parts, any information would be appreciated.
#include <stdlib.h>
#include <stdexcept>
template <typename T> // What is this called when included
class Robot; // is there a special name for defining a class in this way
template <typename T>
class Happy
{
friend class Joe<T>;
friend class Robot<Happy<T> >;
// ...
};