In one of the samples that come w/ Windows SDK (the CreateProcessVerb sample), the WinMain code is as follows:
int APIENTRY
wWinMain (HINSTANCE, HINSTANCE, PWSTR pszCmdLine, int)
{
..
Note that only the 3rd argument is actually specified, the rest have been ignored. How is this possible? Why does the C++ compiler not get upset w/ this? Are default values being pulled in, and if so, through what mechanism?
开发者_开发知识库Thanks -
Todd
In C++ you don't have to give names to the parameters you don't use. In C you can do that only with prototypes:
void function(int, char *, double, long);
In C++ this also works in definitions:
void function(int, char *, double, long)
{
    // ...
}
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论