Short history: I was writing a MessageBox function, but for some reason I got interested in knowing what errors appear when removed his name, but not the arguments, the code would look like this:
//Before removing the name.
MessageBox(NULL, TEXT("Test MessageBox"), TEXT("Test"), MB_OK);
//After removing the name.
(NULL, TEXT("Test MessageBox"), TEXT("Test"), MB_OK); // <- This don't thrown error...
When I click to compile I realize that does not leave any error, indeed, not IntelliSense throwed an error, I was quite surprised, the program itself ran perfectly, but obviously did not show any dialog or message box.
Based on what happened I would like to address the following questions:
What actually happens when leaving the parameters in parentheses?. Why nothing happens?
How might this affect in some pretty big program?, is a serious mistake to leave it?
Does the program will weigh more? Or the compiler will take this into account?
Thanks in Advance...
PD: The application was compiled with Visual Studio 2013.