Introduction to programming - C ++ tutorial - course 1 - first steps

Introduction to programming - C ++ tutorial - 1 course

Introduction to programming - C ++ tutorial - course 1

In this tutorial we will learn the first things about programming. For this we chose the C ++ language, which helps us understand how programming works, but also increase the difficulty gradually to an advanced level. Although we at Venkon, we also use other languages ​​like Java, PHP, HTML, CSS, Javascript, we think C ++ is the best language for making the first steps in programming.

What program are we going to use?


We will use an IDE (developer development environment), namely Code :: Blocks, which you can download available here, where we select "codeblocks-16.01mingw-setup.exe".

After downloading a new "Console Application" project, we select the programming language and the file in which we want to work, and we can start programming.

About Compiler

In short, the compiler is the tool that turns our high-level language code into a high-level language that the processor can understand.

About Libraries

Libraries or Library are collections useful to programmers, where often there are functions or other tools that facilitate programming. An example is the math operations in the "math.h" library, or even "iostream", which helps us read and write to the console using cin (Console Input) or cout (Console OUTput).

About int main () {...}

In the main, as it is called, the content of the program is actually found. The instructions are executed from the top down, and when "return 0" is reached, the compiler knows that the main one is here. Any instruction in C ++ ends with ";"!
About variables

Variables are "boxes" in which we can retain values. An elementary type of variables is "int". This type of data retains integer values ​​from -231pana to about 231-1. (May vary according to compiler)

Several exercises:

1. A number on the keyboard is read. Store in a variable and display (as in the tutorial)
2. Read 2 numbers, store each one in a variable and make an interchange, then display. (As in the tutorial).

2. We read 3 numbers, store each one in a variable, and each of them takes the value of the next variable. We have a, b, c and a -> b, b-> c, c-> a; (The principle of inter-change with the auxiliary variable is used).

Introduction to programming - C ++ tutorial - course 1 - video tutorial


Related Tutorials


Comments

  1. Very nice… we are waiting for tutorials about C ++. Thank you!

  2. Welcome to the videotutorial.ro team and you can do a tutorial with recommendations on what kind of products to keep in mind (price-quality ratio, some technologies and certified certifications) for Black Friday, and here I refer to laptop deals, ssd- TVs. Otherwise we understand and select products when you have some recommendations and explanations as you have done in other years. Thank you for everything you do.

  3. Excellent! We hope to see as many tutorials in this area. Thanks!

  4. Very nice tutorial explained, I expect the following tutorials about C ++.
    Thank you

  5. Bravo! Good luck in the future!

  6. well said, well thought out
    we are waiting for the continuation

  7. Straight ahead
    success

  8. SUPER CONCRETE___You're the first to take courses in Romanian about C ++ ___ cochetez with microcontrollers and I'm interested _____ you are good man, I'm waiting for the following courses a good day and to be loved

  9. Wow, you were surprised. Congratulations !!!!

  10. Professional!
    Where have you been hiding so far more boys? Did not you have the courage?
    It came out very well.
    Thank you.
    Bafta and I expect other tutorials related to this topic.

  11. First of all, congratulations on intent and achievement, I refer to the whole text and video tutorial cycle.
    Unfortunately, reading the text from the presentation page produces 2 disillusionments that I did not expect:
    - "transform the code written by us into high-level language that the processor can understand." The processors only understand the machine code which represents the lowest possible programming language
    - An elementary type of variable is "int". This type of data retains integer values ​​from -231 to approximately 231-1. (May vary by compiler) ”. First of all, if a variable "int" were stored in memory by a byte (byte) it could have values ​​in the limits 0-255 or -128 to 127. In reality a variable "int" is
    stored in 2 bytes so it has values ​​between -32768 and 32767. Then, although I'm not sure, I don't think the "int" value depends on the compiler.
    The error with the number of storage bytes for the "int" variables also crept into the video.

    • Hi Horia!
      We mentioned in the video that the language code (written by us) is turned into low-level code that the car we use can interpret it. In the description I have written by mistake, I will change, thanks for the objection. As for int, if you do a more thorough research on the internet, you will see that depending on the compiler sometimes the result of the sizeof (int) return returns 2, sometimes returns 4. The most common is 4 bytes, and that's why we preferred to exemplify this. Where reference is made in the description, it was initially -2 to the 31 power (that is, 4 bytes), but because of the formatting when the text was transferred to the site, the gain to power was lost.
      From what I remember, in the video I said that it is stored on several bytes what is right.

  12. Congratulations
    We are waiting for such a tutorial

  13. More brothers,
    Hello,
    Is there a wireless usb (wireless mouse) wireless camera model that does not need to be logged on to the network and can be seen directly on your pc?
    I want to put the wireless camera on a teleghid car.
    Maybe you know a wireless camera model for what I want to do, please write to me.
    Thank you in advance.

  14. Awesome!

  15. Can anyone help me solve this problem please?
    To display, on the screen, all 4-digit natural numbers with the property that the sum of their inverses is a subunit number, and the digits are in descending order….

  16. Vasile Trifoi said

    Good tutorial! I'm waiting for the next tutorial.

  17. Stefania said

    Hi, I want a link with all the tutorials you do. I found only one of them and I liked it a lot as you explained.

  18. Very clearly explained. I tried to understand some of the textbooks (including for classes 5-8) and my brain was broken. Unfortunately, it seems that you have given up on continuing this process. Honestly, if you could make an approximation of the number of lessons required for jumping from noob to advanced, I would be open to even considering buying courses from you, if you did them in the same way as this one. In case you have given up permanently to continue this first course (although it seems quite logical that it is, given the time elapsed so far), it may be fair to announce all those who wrote to you and you - asked to continue that there is no point in hoping. A good day !!!

  19. Pavel Marius said

    Although I am not good at programming at all, this being the first lesson from which I understood something and although it seems that the one who posted it does not enter here, however, I would like to point out a possible inadvertence in exercise 3: requires that “each of them take the value of the next variable”, and the representation by signs: “a -> b, b-> c, c-> a” inspires in me the inverse meaning of assignment, such as: “each variable receives the value of the previous variable ””! Or am I not able to interpret the description correctly by signs?

Speak Your Mind

*