With NOTHING in the function main() or WinMain(), make your program display a window, or, just message box.
With NOTHING in the function main() or WinMain(), make your program display a window, or, just message box.
Make an empty program and then hex edit it randomly so you get some kind of error
#define something silly.
#define main(){ main(){display a window, or, just message box.
int main(){}
Heh, don't even have to hexedit it. Just open it with notepad or something, and write your name somewhere
>> Heh, don't even have to hexedit it. Just open it with
>> notepad or something, and write your name somewhere
Actually, I meant by your program, not by the OS's confusion.
And not with a #define either.
I get a nice "would you like to tell Microsoft about this problem" message popupCode:class foo { int *p; public: foo() { p = 0; *p = 0; } }; foo bar; int main ( ) { return 0; }
Do whatever you like in the constructor for your globals to avoid writing any code in main
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
*shakes his fist at salem*Code:#include <windows.h> class MsgBox { public: MsgBox() { MessageBox(NULL,TEXT("Hello!"),TEXT("Rock!"),MB_OK); } }; MsgBox mb; int main() { }
>> Do whatever you like in the constructor for
>> your globals to avoid writing any code in main
Yes, that's exactly what I was thinking of.
I always found this one interesting
Code:class parent { private: public: parent() { cout<< "CONSTRUCTOR!"; } }; parent dsfdf; int main( void ) { return 0; }