
- What you will learn
- Who should take this course on C++
In this lecture we install visual studio, we will use visual studio to code C++.
Creating you first program in C++ that print out text to the Console.
main is the first thing the compiler look for
Here you will learn about the very basic variable types in C++
Variables in C++ continued
C++ Variables continued
More variable types in C++
Why can not we just have one variable type to store all types in C++ ?
We have learned how to output to the console, now it's time to learn how to take input from the user.
In C++ we have a library called iostream that stands for input-output stream. We have used a part of output , now we are gonna use code from the input part of iostream in C++.
How to use the if / else statement
The if statement is used a lot in C++, if you want to run different code if different circumstances. IF one thing happens, do this thing, but if not, do this other thing instead!
the if statement will ether do this thing, or it will do the other (else)
But if you want to run a piece of code if one circumstance is true, AND if that isn't true, you don't want to do this other thing (else). But you want another if statement that has another circumstance that runs another piece of code if that one is correct. THEN if none of the circumstances are true, run this piece of code instead (else).
The switch statement lets you have different cases.
if the user types, let's say 10, run this piece of code.
if he type the number 1, run this other code.
if you are working on a project togheter with someone, a group, a friend etc.. You can put comments in the code to tell what your code does.
Operators are really important to know off in C++
A while loop runs a set of code until the statement given is false.
The do while loop is pretty much the same as the while loop, slight differences.
The for loop is used to loop a given amount of times.
Opening and creating files in C++.
As the title says: Writing text to files
Asking the user what we are going to write to the text file.
Reading from a text file and storing what's in it to a variable.
Storing what is in a text file in different variables.
Using the if statement to check if the file is open or not.
it is important to close files after finished using them.
Creating a function that output text to the console, then we create a function that takes input from the user.
Functions are a lot better with arguments, it is also sometimes called "Parameters"
Functions can do alot of cool things, for example: run loops
Here we create a function that use a for loop to print out an array.
Structures can be used to store information.
Classes can also be used to store information.
Having your code stored in multiple header files is really great. Having one header file where you have your classes, having another header file where your structures are stored, another one for variables.
When a program is ran on your computer, the program is a process, the information inside the process is stored in the process memory in addresses.
A pointer points to another variables address. ( The address where the variable is stored )
C++ Developer Bootcamp - The basics of C++
This course covers the basics of C++. We begin with the complete basics, such as:
- Printing text to the console
- Taking input from the user
- Variables
We move on to the if statement, creating loops and working with files.
Then we work with files, create functions, classes and structures.
In the end of this course, we will learn about header files and pointers.
C++ is one of the most amazing programming languages to learn, and C++ is widely used, ranging from creating games to developing anti-viruses.
If you are an absolute beginner at C++, this course is definitely for you!