int main()
{
std::cout << "Hello world!\n"; // tabbed in one tab (4 spaces)
std::cout << "Nice to meet you.\n"; // tabbed in one tab (4 spaces)
}int myVariableName; // conventional (intercapped/camelCase)
int myFunctionName(); // conventional (intercapped/camelCase)Se usa void para funciones que no devuelven un valor:
void writeValue(int x) // void here means no return value
{
std::cout << "The value of x is: " << x << '\n';
// no return statement, because this function doesn't return a value
}Los tipos integrales se definen así:
short s; // prefer "short" instead of "short int"
int i;
long l; // prefer "long" instead of "long int"
long long ll; // prefer "long long" instead of "long long int"