Explaining the statements C++

I’m gonna try here to explain in my words what the statements mean in section 19. const & variables in the course.

Preprocessor directive: #Include I think this means that you’re accessing/using a database with premade lines of code/commands made by someone that then gives different types of signals to our computer or int main () section. would be that database.

int main() function: This is where you put in the meat of your code. This is where the commands can be ran. It sort of feels like the “head” of the code. In here you will be able to put different types of statements.

Expression statements: Gives info to the user/expressions to the user (player).

Declaration statements: In here you will be able to assign the values to variables. As well as make them static with the const command.

Return statement: I think that if the main() function returns 0 that the program succesfully ran. But I honestly don’t quite understand it that well.

These are my explanations with also some extra reading into it! If I put in something that was incorrect please do correct me. :smiley:

Cheers!

Privacy & Terms