#include <iostream>
using namespace std;
int main(){
return 0;
}
Literals are things the computer can't change. So should the 0 from "return 0;" be a literal too?
#include <iostream>
using namespace std;
int main(){
return 0;
}
Literals are things the computer can't change. So should the 0 from "return 0;" be a literal too?
0 is an octal literal of type int with the algebraic value zero. (In C it would be referred to as a constant.)
You don't need the statement return 0; in main - it's implicitly added by the compiler.
In another context, when declaring a pure virtual function, the
= 0
is called a pure specifier. That notation is used for historic reasons. Using an indentifier with special meaning (pure, perhaps cf. final) would have been a more modern choice.