Thats the type error sorted out thanks nmi to answe your questions
Application is the base class
WindowApplication extends Application
ConsoleApplication extends Application
heres the complete definiton for Application which is where run is defined. the template func are now within the class definition with the correct object
creation syntax. Im still getting the error
* application.h In member function
`void bw1::Application::RegisterWindowApp(T&)'
// Class automatically generated by Dev-C++ New Class wizard#ifndef Application_H#define Application_H//#include "ConsoleApplication.h"//#include "WindowApplication.h"namespace bw1{class ConsoleApplication;class WindowApplication;/** * The Application Layer to interface with the native OS * */class Application{ public: // class destructor ~Application(); template<class T> void RegisterWindowApp(T& className) { Application::Run = &ConsoleApplication::Run; TheApplication = new T(); } template<class T> void RegisterConsoleApp(T& classname) { Application::Run = &WindowApplication::Run; TheApplication = new T(); } // function pointer typedef int (*EntryPoint)(int, char**); static EntryPoint Run; static Application* TheApplication; protected: // class constructor Application(); };//end class Application}// end namespace bw1#endif // APPLICATION_H
and heres ConsoleApplication
/** * Encapsulates a console application * * */ #ifndef ConsoleApplication_h#define ConsoleApplication_h#include "Application.h"namespace bw1{ class ConsoleApplication : public Application{ public: ConsoleApplication(); virtual ~ConsoleApplication(); static int Run (int iQuantity, char** apcArgument); };// end class ConsoleApplication}//end namespace bw1#endif //ConsoleApplication_h