I want to redefine a struct that is already declared by the win32 api. I just want to add a few operator overloads and stuff to it, but I am not sure how to do this.
This is a discussion on Redefining Structs within the C++ Programming forums, part of the General Programming Boards category; I want to redefine a struct that is already declared by the win32 api. I just want to add a ...
I want to redefine a struct that is already declared by the win32 api. I just want to add a few operator overloads and stuff to it, but I am not sure how to do this.
Make a class, that has a different name, that has the win32 struct as a private data member. And then write whatever interface you really want.
Not sure what you have in mind though...usually I find myself wrapping the Win32 functions into a class, so that I don't have to look at their 15 parameters all the time...
The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.
alright that sounds like a good idea, what I have right now is I am just stoping it from declaring it's own struct and I am repliating it. It is working ok but I can see flaws in my way. Thanks.
you can declare your class within a namespace and derive it directly from the WINAPI struct:
Code:namespace my { struct WNDCLASSEX : public ::WNDCLASSEX { }; } int main(void) { my::WNDCLASSEX wce; }
Code:int main(void){srand(time(0));for(double l=rand(),l0=0,l00=0;;l0+=0.1){for(double l000=0;l000 <1;l000+=.001,l+=((double)rand()/RAND_MAX)/0x64,l00+=((sin(l*0x8*atan(l0)*l000-(l0*0x8*atan (l)))*0.5)+0.5)){l00-=floor(l00);for(size_t l0000=0,l00000=(size_t)(0x50*(l00));l0000<l00000;++l0000 )putchar(0x20);putchar(0x61+(int)((double)rand()/RAND_MAX*0x1a));putchar('\n');}}return 0;}