TITLE: Put "Class::" immediately before identifier being scoped PROBLEM: mhern@ctp.com (Michael Hernon) class Function {/*...*/}; class Request { public: int (Function :: *GetRequest(void))() { int (Function::*fptr)(); fptr = Function::TestFunction; return(fptr); } }; I am having a problem defining function GetRequest outside of the class definition. I have tried defining it as follows: int Request::(Function::*GetRequest(void))() {...} RESPONSE: jamshid@emx.cc.utexas.edu (Jamshid Afshar), 10 May 93 [...] Btw, you must use the `&' operator when taking the address of a member function (unlike a regular function). That's a syntax error -- "Request::" must precede the identifier being scoped. Try instead: int (Function::*Request::GetRequest())() {/*...*/} // GetRequest is in the scope of Request Better yet, typedef the member function pointer for readability's sake. class Request { public: typedef int (Function::*FunctionMFP)(); FunctionMFP GetRequest(); }; Request::FunctionMFP Request::GetRequest() { int (Function::*fptr)(); fptr = &Function::TestFunction; return(fptr); } The "Request::" in the return type of GetRequest is required since C++ (since the ARM) does not put nested types in global scope. If your compiler has problems with either method, report the bug. Also test this code with Request being a class template (a BC++ 3.1 bug does not allow nested types to be the return type of a member function). While you're at it, make sure the code compiles when FunctionMFP is private. Although the ARM doesn't allow nested private types to be used in file scope, even to define a member function or static data member, that will hopefully be changed by ANSI C++. IMHO, you should encourage your compiler writer to implement this change and to lobby for this change in ANSI C++ committee meetings.