   Typedef ABC pointer question
  I have an abstract base class which I am using as an interface.BaseClass.hClass BaseClass{// Follow ABC rules  }Typedef struct BaseClass *LPBASECLASS;Two other files will need access to the functions defined in BaseClass:-BaseClassUser.h#include "BaseClass.h"Class BaseClassUser{Public:  LPBASECLASS Function1(VOID) { return m_pPointer; }Private:  BaseClass *m_pPointer;Main.CPP// INCLUDE DLL WHERE BaseClass.h FUNCTIONS ARE IMPLEMENTEDLPBASECLASS g_pPointer = NULL;This works and works fine.  My questions is, with regard to good OOP and good design structure how does it look.  Are there better ways of doing this?   
  I personally really dislike the use of typedefs for pointer types (the whole LPFOO thing), but that's primarily just a subjective thing and won't really cause you any problems.What's concerning is the mass of syntactical errors in your example. Class, Typedef, Public, and Private should not be capitalized. VOID is not valid unless you have previously #defined or typedefd it from void; in any case, specifically listing a function parameter list as foo(void); is generally considered poor form - use foo(); instead.Lastly, and most critically, you have defined BaseClass as a class but then used struct in the LPBASECLASS typedef. This will, at the very least, cause your compiler to complain. It is better to remove the struct entirely from the typedef, as explicitly specifying struct/class/enum/etc. is not required in C++.   ;  I just put the code in there to further the explanation.  I didn't cut it from my program or anything as nothing has been coded yet.  I wouldn't look too much at fixing errors in the code.Interesting point about the typedef Struct statement, will remove.Other than the code syntax and the Struct statement is everything else good practise OOP coding?   ;  Sorry, I'm really not sure what you're looking for - a skeletal class and a couple of contextless lines of code aren't really enough to call "structure", so there's really nothing to critique as far as OO principles go.   ;  Sorry to post an opinion, but I side with ApochPiQ on the subject of pointer typedef's. That's something that Microsoft uses and a concept that I generally don't understand the importance of. To me, a simple pointer token *, or even a double-pointer token **, is a lot more aesthetic than LP or DP and a whole bunch of capital letters.A few more comments:> It seems as though you're using #define's from windows.h. If you wish to have simpler portability, I'd suggest not using those.> The name 'BaseClass' seems extremely redundant. If you do need to have some sort of name-embedded identifier, try the 'C'-prefix approach ('CBase'). Otherwise, it's suggestable that you know what you're using / making.> The syntax, type function(void) { ... } is antiquated C-style. You don't need that void filler in your arguments.> If 'BaseUser' is heavily related to 'BaseClass', I suggest embedding it:class Base { class User {  Base* Function1() { return owner; }  Base *owner; };};To refer to this class, use scoping: Base::UserRemember, these are subjected to different situations and different opinions.   