Welcome to the C++ tutorials! The lessons in these tutorials are primarily designed to help beginning level programmers get a hands on grasp of the fundamentals of C++. Each turtorial is broken down into sections which contain examples, in depth explainations of code, and practice files for users to implement and test their own code! there is no suggested amount of time that you should spend with each section; progress through the material at a pace that is comfortable for you.
Access our HTML Website
- Go to C++ Tutorials!:Learning the Basics
- You can download lesson excercises as you go along, as well as the C++ Quiz game.
Repository Organization:
C++: Learn How To Code Website: All Website Implementation including: .cpp files and all html and css files
Lesson 1: Basic Structure of C++:
File: L1: assignment holds HelloWorld.cpp
README: Lesson Plan
Lesson 2: Variables and Types:
README: Lesson Plan
Lesson 3: Operators and Arithmetic
File: L3: Assignment holds L3Assignment.cpp
README: Lesson Plan
Lesson 4.1:Intro to Statements:
File: L3: Assignment holds L41Assignment.cpp
README: Lesson Plan
Lesson 4.2: Functions:
File: L3: Assignment holds L42Assignment.cpp
README: Lesson Plan
Who Wants to Be a C++ Programmer Quiz Game:
File: Makefile
File: millionaire.cpp
README: Explanation of Game
-
You will have to be in an environment that can run Geany and .cpp files
-
We can use the VM.
-
Under Assignments on almost every pages is a link that you clicking in order to download the files.
-
Once you download them open the files up in Geany
-
In order to run the assignment files. Complete Task
-
On Geany click the Compile button
-
Fix errors
-
Recompile untils errors complete
-
Hit the gear button on Geany which will run the tests.
-
Further instructions on how to use the Game file is listed on the website.
In order to code, it is important to understand the basic concept on how C++ works. Each section will contain a README.md file that provides a detailed description on how the specific topic covered works, and a tutorial on how to implement that specific code.
The key to becoming a great programmer is practice. In these tutorials, we have provided templates and test files for you to practice implementing your own code. Each section will have their own assignment in which you can practice writing your own code, and test files for each assignment so you'll know whether or not you have implemented your code correctly.
Remember, learning how to program takes a bit of patience, so be sure that you take your time when going through these lessons.
Have fun!
Goal: Introduce what a basic c++ program looks like. We will introduce the following concepts in this tutorial:
- cout command
- Comments
- Namespace
- #include
- Main Function
Exercise: Hello World
Goal: Introduce variable and types. We will introduce the following concepts in this tutorial:
- Strings
- Ints
- Floats
Exercise: Quiz on different data types. This quiz quiz will be on our HTML website that will test you on the basics of variables and different data types.
Goal: Introduce basic operators. We will introduce the following concepts in this tutorial:
- Variable assignment
- basic arithmetic --*addition --*subtraction --*multiplication --*division
- string arithmetic
Exercise: Implement basic functions program that manipulates strings and numbers.
Goal: Introduce different types of statements. We will introduce the following concepts in this tutorial:
- If/Else
- For Loops
- While Loops
- Different statements --* Jump Statements --* Break Statements --* Continue Statements
Exercise: Implement a program using various types of loops
- If: Tell whether an number is even or odd
- For: write a summation function --* int summation that takes parameter n
- While: while your iterator is <= 16, print nah. if it is greater than 16, print batman --* implement an iterator count up until 17 and returns batman
Goal: Introduce functions (Structure program in segments of code to perform certain tasks)
- Functions
- Void Functions
- Recursive Functions
Exercise: Implement a variety of functions
- Practice using helper functions
- Recursive summation for int x
After you feel that you are comfortable with the lessons in these tutorials, you can play the "Who Wants to be a C++ Programmer" quiz game! This game is designed to test your knowledge with the basics of C++, and provide insight on where/what areas you should improve on! This game can be downloaded and run through your terminal.