Preprocessor directive: these are instructions that go to the compiler to convert the code we’ve written into binary code that the computer can read.
Main function: This is the entry point for our program. Any code we write is outputted from here.
Return statement: this is our error detector. If the code is read and there are no errors it will return zero and run our code. But if there is an error it will show up in our compiler.
Expression Statements: these statements are what we want to show in our game. anything within a std:: will be pushed to the terminal.
Declaration statements: these hold our variables that can be called back to with the variable: only if it is underneath the declared integer.
Summary: So far our program is taking orders to our compiler to convert our code into machine binary. then it is loading our main function which houses our code. This brings us to our expression statements which is the main dialog of our game. Now we have the declaration of our variable in our games which is the code our player must figure out. That brings us to our next expression statement and that is the sum and product of our chosen code. After that is checked our return statement looks for any errors and send the saved code to the compiler to be converted.
Lastly we simply run our code through the command prompt with typing: triplex
If there’s anything I’ve misunderstood please correct me and let me know if i left something out.
Thanks and good luck!
Reece