no logo yet
fb yt tw
google

C++ Tutorials

Select Tutorial Set

Tools

Lesson 1: Introduction to C++ 2010

This tutorial pretty much shows you how to set up Microsoft Visual Studio 2010 and how to properly set up your code that we will be using in every tutorial from here on out.

Lesson 2: Comments, Variables, Data Types

This tutorial will cover how to create comments and various data types you can assign to variables such as integers, doubles, floats, chars, strings, and Boolean.

Lesson 3: Arithmetic and Assignment Operators

This tutorial will cover both arithmetic and assignment operators in detail.

Lesson 4: Math and Algorithm Class and Static Cast Conversion

This tutorial will cover some functions from both the algorithm and the math classes. We will also review the static cast.

Lesson 5: String, Getline, Concatenation, and String Functions

This tutorial will review upon strings as well as using the getline function. We will also learn how to concatenate strings together as well as use some predefined string functions from the string class.

Lesson 6: If Statements and Comparison and Logical Operators

This tutorial will cover decision making via if and else if statements as well as use of the logical and comparison operators: && || ^

Lesson 7: Constants and Formatting Decimals

This tutorial will cover the use of constants as well as formatting decimals to a fixed precision of trailing decimals.

Lesson 8: Switch Statement

This tutorial will cover how to use the switch statement with both integers and characters (chars) as the selected data type.

Lesson 9: Loops

This tutorial will discuss the syntax for the while, do while, and the for loop in the C++ programming language.

Lesson 10: Nesting, Exiting, and Continuing Loops, Quotes in Strings

This tutorial will show how to place quotes inside a string as well as nest if statements and loops within one another. We will also learn how to use the continue and break keywords with loops.

Lesson 11: Functions

This tutorial will cover how to make function declarations as well as function definitions in your main file.

Lesson 12: Variable Scope and Parameters

This tutorial will cover both local scope and global scope for variables as well as how to pass parameters into your functions.

Lesson 13: Passing by Value vs Passing by Reference

This tutorial will cover the difference between passing parameter by value and by reference.

Lesson 14: Functions as Parameters

This tutorial will cover how to pass functions that return a value as a parameter in to another function.

Lesson 15: Arrays

This tutorial will cover how to declare and fill arrays.

Lesson 16: Arrays as Parameters

This tutorial will cover how to pass arrays as parameters into function.

Lesson 17: Multidimensional Arrays as Parameters

This tutorial will cover how to create and pass multidimensional arrays as parameters into functions. This is a HARD tutorial! DON'T LET THIS TUTORIAL INTIMIDATE YOU!

Lesson 18: Vectors and Vector Functions

This tutorial will cover how to declare vectors and use various vector functions such as push_back, at, insert, remove, clear, and empty.

Lesson 19: Vectors as Parameters

This tutorial will teach you how to pass vectors as parameters into functions. We will also learn how to print only the even elements in a vector, reverse print the elements backwards, and replace one integer with another in the vector.

Lesson 20-1: Classes and Object-Oriented Programming (Part 1)

This tutorial will detail how to create a class using a separate cpp file and a header file. In this part, we will successfully create a default constructor, an overload constructor, and how to instantiate an object using either of these constructors. We will also create member variables in the private access modifier.

Lesson 20-2: Classes and Object-Oriented Programming (Part 2)

This tutorial will finish up what we started in the last tutorial. Here, we will create our destructor, create our accessor functions and mutator functions, and create a function to calculate BMI (body mass index). I hope the tutorial is helpful.

Lesson 21: Vectors of Objects

This tutorial will teach you how to allow the user to create as many objects as they want using vectors.

Lesson 22: Random Numbers and Static Variables

This tutorial will cover how to implement random numbers as well as some intuition on static variables and how non-static variables are destroyed.

Lesson 23: Static Member Variables

This tutorial will teach you how to use static member variables in a class and how to modify them with constructors and destructors.

Lesson 24: Inheritance

This tutorial will cover how to use inheritance to inherit variables and/or functions from another class. Derived/Child classes inherit from the base/parent class. We will also learn how to use the protected access modifier.

Lesson 25: Pointers

This tutorial will cover how to create pointers, direct a pointer to a specific address, return the value, return the address of the value, and return the address of the pointer.

Lesson 26: Dynamic Memory Allocation

This tutorial will cover how to dynamically create variables as well as use them as normal variables.

Lesson 27: Dynamic Arrays

This tutorial will cover hot to dynamically create arrays as well as deallocate variables and arrays from memory (heap).

Lesson 28: Recursion

This tutorial will cover how to use recursive statements in your program. It will also illustrate the difference between iteration and recursion as well as explain when one should be used over the other. We will also be introduced to stacks.

Lesson 29: Reading and Writing to Files - fstream

This tutorial will cover how to use the fstream library and read and write to files on your computer. It will show you some other techniques as well.