With NOTHING in the function main() or WinMain(), make your program display a window, or, just message box. :D
Printable View
With NOTHING in the function main() or WinMain(), make your program display a window, or, just message box. :D
Make an empty program and then hex edit it randomly so you get some kind of error :p
#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 :p
>> Heh, don't even have to hexedit it. Just open it with
>> notepad or something, and write your name somewhere
:p
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 popup :)Code: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
*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;
}