Why can't we declare main method as const in CPP??
int main() const
{
//Some code
}
Someone can please tell me why?
Why can't we declare main method as const in CPP??
int main() const
{
//Some code
}
Someone can please tell me why?
Copyright © 2021 Jogjafile Inc.
constqualifiers can be used only to declare member functions of classes. It is not an option for non-member functions, whichmainis one.