Working with variables in C++

Hey people! :smiley:

In this lesson we cover how to declare and initialize variables in C++ and how to output the value of them to the terminal.

We also learn how to use arithmetic operators to intialize our sum and product variables with expressions.

Did any of you try the other arithmetic operators? :eyes:

I probe all operators and also found another operator (%), what this operator does is assign to the variable the value of the waste in a division

3 Likes

I didn’t try other operators, however I did name my variables names as a, b, c, sum, and product are too ambiguous based on coding standards.
I named my variables outside of main to make them global and named them firstCodeNumber, secondCodeNumber, thirdCodeNumber, sumCodeTotal, and productCodeTotal.

1 Like

@GavinMilroy Hi, im catching up with this talk about variables, arithmetic operators and etc… I just wanted to know is it ok to follow up without commenting everything here, cause it is the really basic stuff ( I’ve worked with python, mel, maxscript, and used blueprints lot in UE)? I’m reading every forum post for the current lecture I’m on.
I’m waiting to get to the bit more complex part to kick in…
Is that ok?

P.S. I really like the course, thumbs up for the great lessons! :smiley:

Hi I did the basic programming without the other operators as told, and making the code easy to read. I thought I did pretty good. When using visual code is their a way to use screen capture without third part software.