Zeiger auf OBJ ohne Zeiger?
-
"The IDirect3DDevice9 interface is obtained by calling the IDirect3D9::CreateDevice method.
This interface, like all COM interfaces, inherits the IUnknown interface methods.
The LPDIRECT3DDEVICE9 and PDIRECT3DDEVICE9 types are defined as pointers to the IDirect3DDevice9 interface.
typedef struct IDirect3DDevice9 *LPDIRECT3DDEVICE9, *PDIRECT3DDEVICE9;"
http://msdn.microsoft.com/en-us/library/bb174336(VS.85).aspx
-
Und wer errät jetzt wofür das P am Anfang des Bezeichners steht?

-
Was hat sich MS dabei eigentlich gedacht, was bringt das?
-
Das man "erkennt" das es sich dabei um einen Pointer handelt.
-
Ah jo

Aber ich verstehe noch nicht ganz wie man das macht
Könnte mir jemand der so net ist nen kurzes beispiel geben?
-
Code-Walker schrieb:
Aber ich verstehe noch nicht ganz wie man das macht
Könnte mir jemand der so net ist nen kurzes beispiel geben?Hä? So?
typedef std::string* pstring; pstring s = new std::string; s->assign("hallo");
-
typedef DIRECT3DDEVICE9* LPDIRECT3DDEVICE9;
-
achsooo, durch das ganze dx zeugs da hatte ich garkein durchblick, danke! Ist ja ganz simpel

-
Ansonsten gibts auch die Möglichkeit, den
operator->zu überladen.
-
Code-Walker schrieb:
achsooo, durch das ganze dx zeugs da hatte ich garkein durchblick, danke! Ist ja ganz simpel

Du kannst dir die Typen ja genau anschauen. Wenn das deine IDE nicht automatisch beim drüberfahren macht, steht das auch in der Doku.
