Video C From Beginner To Expert Course

Tags: C++

Designed for people who don't have any knowledge about the programming and want to program in C++

Last updated 2022-01-10 | 4.3

- How to use C++ language in action
- What is compiler / IDE / Variables / types of variables etc.
- How to work with files - fstream library (i/o operation on files)

What you'll learn

How to use C++ language in action
What is compiler / IDE / Variables / types of variables etc.
How to work with files - fstream library (i/o operation on files)
operators - arithmetic
assigment
logical
bitwise
conditions like if / else / switch
arrays / multi-dimensional arrays
loops - for / while / do-while
functions
overloading functions
passing variables to functions etc.
structures
referencers
pointers
dynamic allocation of memory
creating project in IDE
classes
object oriented programming
class and function templates
namespaces
exceptions
input / output streams and validation of data
STL: vector

* Requirements

* English language
* Code::Blocks IDE (free)

Description

  • How to use C++ language in action
  • What is compiler / IDE / Variables / types of variables etc.
  • How to work with files - fstream library (i/o operation on files)
  • operators - arithmetic, assigment, logical, bitwise
  • conditions like if / else / switch
  • arrays / multi-dimensional arrays
  • loops - for / while / do-while
  • functions, overloading functions, passing variables to functions etc.
  • structures
  • referencers
  • pointers
  • dynamic allocation of memory
  • creating project in IDE
  • classes
  • object oriented programming
  • class and function templates
  • namespaces
  • exceptions
  • input / output streams and validation of data
  • STL: vector

Course content

18 sections • 105 lectures

Intro & info about 100+ exercises Preview 00:33

Motivational introduction to my course about C++ and info about how to download 100+ exercises regarding C++.

What is programming, compiler. Installing IDE Preview 15:40

You will learn what a programming language like C++/IDE and a compiler is. What is C++? 

Problems when compiling C++ project? Solution INSIDE for mac users too Preview 01:56

If you have a problem compiling your C++ project than look here to find a solution. Some IDE's might be a bit different. You might have also made a few mistakes. Let's try to solve the problem.

Basics of programming Preview 16:35

what are:
- comments
- libraries like iostream
- std namespace
- how to send something to the output (cout)

Variables Preview 17:00

We are exploring the concept of "variable", "variable type", "declaration", "definition". Exploring naming rules of variables and notations.

Types of Variables Preview 18:54

We learn basics types of variables in the c++ language like:
- int, float, double, string, char, bool 
We learn about address of variable, how to combine string, what are unsigned variables, what are constant variables and when to use them.

Downloading data from the input Preview 04:11

We learn how to download data using cin>> and we write a simple program that loads first name and surname, then it prints out that values in the console output.

Basics Quiz (Updated Nov 21')

Arithmetic and Assigment Operators Preview 14:16

We learn what operators are. We learn about arithmetic operators like: +, -, /, * and assignment operators like +=. We learn how incrementation and decrementation works, and what's the difference between post and pre incrementation / decrementation.

Relational Operators Preview 06:21

We learn how to use and what are relational operators.

Logical Operators Preview 09:33

We learn how to use and what are logical operators like conjunction, disjunction, negation.

Bitwise Operators (Advanced - Optional at start) Preview 20:32

We discuss the bitwise operator. We find out what are the bits, bytes, and we learn how to transform the number of any system such as binary to decimal system.

Operators Quiz (Updated Jan 22')

What you will know after operators section?

Conditional Statements Preview 14:26

We learn what are conditional statements. We learn what are curly braces used for {}. We learn about nested conditional statements.

Switch Preview 09:15

We are learning about the conditional switch instructions. We learn what values can be handled by the switch, we learn about the ASCII table.

Conditional Operator Preview 05:02

We learn how conditional operator is working and when to use it on examples.

Calculator - exercise Preview 15:11

We write a calculator that adds, subtracts, multiplies and divides numbers and is resistant to dividing by zero, we learn about goto instruction.

Conditional Statements Quiz (Updated April 20')

Let's see how you remember conditional statements

Arrays Preview 16:35

We find out what are the arrays and how they are represented in the memory of our computer.

Multidimensional Arrays Preview 07:44

We are getting familiar with multidimensional arrays.

Array Quiz (Updated April 21')

for Preview 12:02

We learn what the loop is, and we are getting familiar with the "for loop". We learn how to assign different values to an array ​​using a loop.

while and do while Preview 10:15

Learning while "loops" and "do while", we learn what differences are between all the loops.

exercises, nested loops Preview 14:19

We practice the loop, we write a program that calculates the number of digits in the number total, and a program that prints a nicely formatted

break and continue Preview 13:11

We practice the loop, we write a program that calculates the number of digits in the number total, and a program that prints a nicely formatted multiplication table. We learn what nested loops are.

Loops Quiz (Updated Feb 21')

pre-function Scope of Variables Preview 10:38

We learn about global and local variables and their properties. We write a simple program summing many numbers and we show to avoid very common error.

Functions Preview 29:13

We find out exactly what function is, how to declare / define. How to distinguish a declaration from the definitions and what are the parameters of the function.
We are getting to know:
- The concept of function call / return values ​​of the function
- Inline function.
We create two simple functions, one that ask user for a name and a function that checks if the data coming from the input is digit.

Functions - return, and invoke explained in text Preview 01:00

What "return" keyword does?

Overloading functions Preview 12:46

We explain the title issue and train functions, writing two different functions to raise the number to any power.

Loops and functions - exercises Preview 20:13

Practicing loops and functions we write a program with the menu, which calculates the area of circle, square, rectangle and triangle, until the user decides otherwise. We learn how to clean the console screen.

Data Validation - exercise Preview 21:25

We learn how to make the program that does not crash if the user enters invalid data. We also make sure that after entering invalid data into our program, user would get informed and asked for the correct data until the data is correct.

Why do we use cin.ignore and cin.clear()? Preview 07:19

Shortcut text version of why we used cin.ignore and cin.clear in last lecture :)

Why do we use cin.ignore and cin.clear.

You will finally understand:

1) why do we use these instruction

2) how to use them

3) when to use them

4) what makes them different

as a bonus I explain getline function, you will understand use cin vs getline.

Functions Quiz (Updated May 21')

Enum Type Preview 11:18

Learning enum variable type.

Reference Variables Preview 09:49

We find out what are the reference variables, how to create them, and how to use them.

Reference Variables in functions Preview 08:33

We show how to use reference variables on example: writing a function that swaps two values. We learn how to return a reference type variable.

References and Enums Quiz (Updated Apri 21')

What are pointers? Preview 19:38

Becoming familiar with the scheme, how memory is represented in our computers, and what happens when we create typical variables and pointer variables.
We learn what the pointer is and how to use it. We learn what the constant pointer is, and the indicator of permanent value. What is pointer that points to another pointer etc.

Name of array - Pointer Preview 13:22

We learn that the name of the array is really a constant pointer. We show how arrays look in the memory and then we exercise this matter.

Dynamic allocation of memory Preview 22:15

We learn what is the allocation, and why we need dynamic memory allocation. We learn what is "new" operator doing, we create dynamic arrays, we refer to them, and release the dynamically allocated memory.

Strings and a pointer on a char type Preview 20:43

We learn how memory is represented in a string. And we exercise strings on various examples.

How to make sure to correctly free memory of dynamically allocated array? Preview 01:50

How to make sure to correctly free memory of dynamically allocated array?

I will show you a common error while freeing memory and how to solve it.

Functions and pointers Preview 17:26

We learn how to pass arrays to functions and simple variables by using pointers. We learn about sizeof function. We learn how to calculate the size of the array.

Lottery - pseudo-random numbers generator Preview 17:50

We learn the difference between the random numbers and pseudo-random numbers. We are exploring the functions rand () and srand (). We write a function that simulates a lottery, for example drawing six balls of the 49th. This function is universal. You can draw whatever number of balls.

Type Casting Preview 06:30

We learn about type casting the C and CPP way.

Why do we need pointers? Preview 00:18

Document describing why pointers are needed, why do we even learn about them?

Pointers FAQ - most confusing parts explained! Preview 03:28

In this lecture I will explain the things that are the most confusing about pointers

Pointers Quiz (Updated Jan 21')

Creating project, external execution of program Preview 17:45

We learn:
- What is the project and how to create it
- Why the main function should return 0 or 1 
- Why the main function takes an int argc, char * argv or []
- what does char * argv [] mean
- How to bring our program from cmd
- How to write all the values ​​of arguments
- How to check the various arguments and respond to one of them
- How should we compare the strings, that are not string type.

Preprocessor directives, Multi-file project Preview 15:08

We are creating the multifile project, we learn the proper way of including new headers. Learning extern modifier. We learn what the preprocessor is, and we are getting familiar with a few preprocessor instructions.

Data Structures and Pointers Preview 11:23

We learn:
- What the structures are
- How to refer to individual elements of the structure
- How to create an array of structural types and refer to the various structural elements in the array using operator "." and "->"

Classes Preview 31:12

We learn:
- What the class and the object is
- What an instance of class is
- How do the private and public access modifiers are working
- What is a method, and how to create it inside the class
- What the declaration and the definition of class is
- How to separate the definitions from the class declaration in one file and multiple files
- What the range operator "::" is and for what it is used to
- What a constructor is and what it does
- How variables are working with the static modifier
- What the destructor is and when it is called
- How to refer to the content of our instance of classes by using pointers

Static variables and functions Preview 10:40

We learn about: - Static properties / variables - Static methods/ functions - Id (key) We write a class that represents the user with a unique identifier.

Constant classes and methods Preview 08:02

We learn what happens to the components of the class when we precede the instance of the class with the const modifier.

Friend functions Preview 04:17

We're talking about friendship between global functions and class functions :)

Friend classes Preview 06:37

We keep talking about friendship but now between classes.

Copy constructor Preview 11:51

We discuss the copy constructor, what it is and when should we use it.

Convert constructor and overloading operators Preview 14:43

We learn how to create our own constructor converts, and how to overload operators, so that you can perform "operations" on our own objects.

Inheritance between classes Preview 28:02

We are familiarizing with the concepts of inheritance / parent class / base class / superclass / child class / derived class
We learn:
- How to give a default value for the constructor method.
- How are subclasses inheriting from the base class depending on the method of inheritance: public, protected, and private
- In what order constructors and destructors are called while creating objects that are inheriting something
- How to call a constructor using constructor
- Etc. etc.)
We learn about this creating Point and Point2D classes.

Polymorphism, virtual functions, abstract classes Preview 19:47

We create a farm with animals issuing strange noises;) and we learn: - What is the polymorphism, virtual functions and the abstract classes. We show where things like that might be useful.

Why do we need polymorphism? Preview 00:33

Why polymorphism is needed?

Virtual destructor Preview 03:40

We learn what is a virtual destructor, and why and when it should be used.

Structures and Classes Quiz (Updated Nov 21')

Function templates Preview 15:25

We find out what function templates are, how and when to use them.

Class templates Preview 20:37

We learn:
- What are templates of classes
- How to define / declare class templates
- How to inherit template class
- How to create a specialized class templates
- How to create a specialization of individual class methods
- How to create a partial specialization of template classes
- How the typedef

Templates Quiz (Updated Apr 21')

Exceptions Preview 14:54

We find out what are the exceptions and how to handle them. We are learning a new type of structure: try {} catch {} throw. We write our own class that represents an exception.

Namespaces Preview 14:13

We learn what namespaces are and how to create them. We are creating our own namespace, which define an interesting class that allows us to print out information about our classes as follows: cout << nameOfOurClass;. We write the function that overloads operator <<.

Streams - what is input and output Preview 06:27

What is stream, input and output. We are making ourselves familiar with word stream, input and output.

How to open and close files? Preview 06:27

Your learn how to close and open files and how to check if the filed was opened properly. You also learn how to simply put text into file.

File opening modes Preview 13:24

You learn file opening modes (states) and differences between them. We learn how to open file and:

  1. make it readable
  2. make it writeable
  3. being able to add content to it
  4. treat it as binary file (we also learn difference between binary and text file)
  5. keep the content / truncate content after opening


Stream's error flags Preview 17:41

We discuss all stream's error flags and we show how to use them. You will know how to react on unexpected situations that happens during reading from the file like for example assigning string to integer or opening file for writing which had the flag set to only reading (ios::in)

You will know functions like:

  1. fail
  2. good
  3. bad
  4. eof
  5. clear
  6. rdstate

and you will know how to operate on states (failbit, goodbit, badbit, eofbit) using bitwise operators and rdstate function.

You will know how to read whole file using one loop and eof function.

Reading position pointer - seekg and tellg Preview 08:53

What are and how to use reading position pointer. How to programitically check how many bytes the file has. You will learn and understand functions that reads and sets position of reading pointer.

Writing position pointer - seekp and tellp Preview 03:55

You will know what is and how to use writing position pointer. You will learn functions seekp and tellp which allows you to retrieve and show where is the writing pointer.

Extracting characters from files Preview 15:26

You will learn:

  1. how function getline and ignore works
  2. how to retrieve all lines of text from file at once
  3. how to ignore characters that are not needed
  4. how to extract from file with names and surnames only initials

Comparing content of two files Preview 25:11

You will know how read function works. We are creating function that is counting size of file and function that is checking if two binary files are the same. We are training pointers on practical example. We also learn abot memcmp function which is used to compare memory.

Put - loading characters from cin stream directly to file Preview 04:17

You will learn hot to load characters from standard input (cin) and put them into the file. In addition to this you will learn how to add after each letter of string a space or any other character.

Peek - peeking characters without extracting Preview 03:42

You will learn function that allows to peek characters before exracting and you will know how to retrieve information from steam in order to assign variables to the right type of variables.

Putback - returning extracted character on stream Preview 02:38

You learn how to return extracted character back on the stream so it can be read again

Write - writing bytes to file Preview 05:42

You will learn how to save bytes to files and when you should use write function over saving operator (<<)

Gcount - counting characters from last operation Preview 03:35

You will learn how to get count of characters retrieved from file on practical example.

Mini database Preview 42:03

Lesson where you gonna learn how to create mini database that allows you to:

- add people

- show added people

- save people to file

- load people from file

- search base by typing name

- remove person by id


What is STL? Preview 02:30

STL stands for Standard Template Library - what does it mean?

It means that is is a library, so some kind of set of tools, consisting of C++ template classes.

We have talked about templates already. Now you will see how powerful they are if they are used properly.

It is called "standard" because it's a standard offical library used by every C++ programmer. Which also means that every programmer including you should know how to work with STL.

To sum up STL provides you with classes/templates/functions that are solving common problems with storing and managing data that we gonna talk about in future lectures.

VECTOR - how to use it? Why is it useful? Preview 14:02

What is a vector?

How to create it?

How to add new elements to the vector?

How to change the values of vector elements?

How to get the vector size? What is the difference between capacity and size of the vector?

C++11 - how to enable the flag? How to set starting values of vector? Preview 03:00

How to enable c++11 flag in code::block? How to set starting values for vector?

What are iterators? How to use them? Preview 10:56

What is an iterator?

How to use iterator?

Why do we use iterators?

What are iterators - NOTES Preview 01:32

What is an iterator - notes to lecture

How to iterate vector? How to use loops to process elements in a container? Preview 04:16

How do iterate the vector?

How to process elements inside a container like vector?

auto keyword - C++11 Preview 04:07

What is auto keyword doing?

When should we use auto keyword?

ranged based loop for - C++11 Preview 03:41

How to iterate through container elements using ranged based loop for?

ranged-based loop for - & - how to prevent making a copy Preview 07:16

How does ranged for loop works with reference variable? When should we use reference variable? When should we use const reference variable?

Finding specific amount of odd numbers Preview 08:51

We learn how to write an algorithm that prints out as many odd numbers as our heart desires ;)

The absolute value Preview 03:32

How to count absolute value of a number?

Spelling the word backwards Preview 04:43

How to spell a word backward?

How many digits are inside a number? Preview 07:31

How to check how many digits are inside a number?

Multiples of number up to... Preview 04:25

We write an algorithm that checks if a given number is a multiple of a second number.


We print multiples of a number up to a given number by the user

Finding largest number (max value) Preview 12:20

How to find the largest number from the set or separate values?

Can 3 sides create a triangle? Preview 02:18

How to check if 3 sides can be used to create a triangle?

Is it a rectangular triangle? Preview 03:30

How to check if triangle is rectangular?


Factorial iteratively Preview 04:40

How to count factorial of a number using iteration (loops)

Factorial recursively Preview 11:31

  • What is recursive function?

  • how to solve factorial using recursive function?

Fibonacci iteratively Preview 09:12

How to count fibonacci number from sequence using iteration?

Fibonacci recursively Preview 07:56

how to solve Fibonacci using recursive function?

when should you use recursive function and when should you use iterative function?

What's next? Preview 03:54

What's next? What should you after watching all the vidoes? Where can you traing your programming ability?