84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
int main P2(int, argc, char **, argv)这个是什么意思?入口函数吗
After searching, I found a similar question on stackoverflow: why main P2((ac, av), int ac, char ** av)?
It probably means that P2 is a macro. This macro is for compatibility with older versions of compilers. For example, some early C languages are not
int main(int argc, char *argv[])
but
main(ac,av) int ac; char **av;
P2(int, argc, char **, argv)This macro will use different int main() forms depending on the compiler.
P2(int, argc, char **, argv)
int main()
There is no such syntax in C. If it can be compiled like this, P2 should be a macro
P2
#define P2 int main P2(int argc, char** argv) { return 0; }
After searching, I found a similar question on stackoverflow: why main P2((ac, av), int ac, char ** av)?
It probably means that P2 is a macro. This macro is for compatibility with older versions of compilers. For example, some early C languages are not
but
P2(int, argc, char **, argv)
This macro will use differentint main()
forms depending on the compiler.There is no such syntax in C. If it can be compiled like this,
P2
should be a macro