+ 1
Can main() be changed to a different identifier tailored for a specific program? If so then how
main() -> main_entry()
7 Respuestas
+ 5
I don't think so, it's irreplaceable, without it the program won't compile
+ 4
which language??? please do specify language while tagging
+ 3
What's wrong the following?
int main() {
return main_entry();
}
Many objected oriented programs have main functions that look like:
int main() {
Application application;
return application.run();
}
As for your question, there's probably a hacky way to do it in GCC, but there's no standard way to do it and it's not a good idea.
+ 2
Pardon me it's C++
+ 2
No but main() can be used as just a wrapper for main_entry() or whatever other primary function name that you like.
+ 1
It's just that I once came across such on quara but never saw the actual code to do that so I'm on the fence with this one
+ 1
But thanks