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


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.


@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:

1 Like

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.

fatal error C1083: Cannot open source file: 'triplex.cpp': No such file or directory did any one else get this error?

1 Like

fatal error C1083: Cannot open source file: 'triplex.cpp': No such file or directory did any one else get this error?

The files became inaccessible. You will need to fix path, files location, or files. You can also see if there’s an update for the code application you’re using should it be a bug.

1 Like

How can I fix the path or files and locations ??

I get it and don’t know anything how can I solve that .

Not really sure how to help you with that. It would be good for you to already understand that as its a part of development but far too complex for me to go into and too much stuff to go back and forth with.