In Frank Luna's Book, author has this class D3Dapp:
D3Dapp::D3Dapp(HINSTANCE hInstance, std::string winCaption, D3DDEVTYPE devType, DWORD verProc)
Then he has child class:
HelloDirect3D::HelloDirect3D(HINSTANCE hInstance, std::string winCaption, D3DDEVTYPE devType, DWORD VerProc):D3Dapp(hInstance, winCaption, devType, VerProc)
And finally, he creates object of child class:
HelloDirect3D mApp(hInstance, "X", D3DDEVTYPE_HAL, D3DCREATE_HARDWARE_VERTEXPROCESSING);
Now, i'm having a little problems understand what exactly is going on around here.
If i start with object; i create object from HelloDirect3D child class, and give those 4 parameters. But i did not state parameters for parent class ? So when i use hInstance or "X" in object as argument......does it assign them to child class, or parent class, or what? I thought parent's constructor always gets "calculated" first, only then childs.
So i'm having problems understand, to wich constructor does those parameters goes?
Or, was it, when i created subclass of D3Dapp, and and first declared arguments for childs constructor...those same arguments translated to the parent class with
HelloDirect3D::HelloDirect3D(HINSTANCE hInstance, std::string winCaption, D3DDEVTYPE devType2, DWORD VerProc):D3Dapp(hInstance, winCaption, devType2, VerProc)
Tnx!