我在C/C++项目中进行实验时注意到以下内容:
C ++
#include <iostream.h>
int main (int argc, const char * argv[]) {
// insert code here...
cout << "Hello, World!\n";
return 0;
}
and
C
#include <stdio.h>
int main (int argc, const char * argv[]) {
// insert code here...
printf("Hello, World!\n");
return 0;
}
我一直想知道在C/C++的int main函数中,那些默认参数到底是做什么用的?虽然不加这些参数也能编译应用程序,但它们到底有何作用呢?
char*[]
和char**
都是有效的。 - md5