Topic: main() prototype
Author: David R Tribble <david.tribble@central.beasys.com>
Date: 1997/03/03 Raw View
The CD2 states that "all implementations shall allow both of the following
definitions" of ::main() [3.6.1, basic.start.main]:
int main(); // A
int main(int argc, char *argv[]); // B
Are the following prototypes also allowable?:
int main(int argc, char *const argv[]); // 1
int main(int argc, const char *const argv[]); // 2
int main(int argc, char *const *const argv); // 3
int main(int argc, const char *const *const argv); // 4
I assume that this one is not legal (because it compromises const-safety):
int main(int argc, const char **argv); // 5
-- David R. Tribble, david.tribble@central.beasys.com --
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]