Skip to content

chemphys/LearnCPP11

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LearnCPP

Last updated 05/16/2018 by @chemphys Email: [email protected]

Requirements

There are no knowledge requirements to be able to follow these sets of lessons. However, familiarity with linux and jupyter notebook are required. All the notebooks will work on linux, but their usability is questioned for windows. It is necessary that the user has gedit(linux/mac) or notepad++(windows) installed. It is necessary that the user has g++ installed.

If you are not familiar or have never installed anaconda/miniconda, please do the following:

Set up of the Notebook in Linux / Mac

  • Download anaconda3, and install the version with python 3.X
  • Install (or make sure you have installed) g++ and gedit
  • To start learning, run jupyter notebook, and a new tab in a browser should open. Locate your favorite lesson notebook (.ipynb files) and start!

Set up of the Notebook in Windows

  • Download anaconda3, and install the version with python 3.X
  • Download notepad++, and install it
  • To start learning, locate in the windows menu the program Jupyter Notebook. Navigate to the notebook you want to open, and start learning! However, if you are using WINDOWS, you will need to replace, any time it appears, the command gedit by the command start notepad++.

Running commands in the Notebook

Inside the notebook, as you will see, there are several cells. To run the content of a cell, use shift + enter. A single enter will just create a new line inside the cell.

Feedback

Any kind of feedback is welcome. If something is not working, please open an issue on github and I will happily check it out.

Contents

Lesson 1

Introduction to C++ through examples. This lesson shows:

  • Basic C++ program
  • Compilation
  • Variable types and assignment
  • Input/Output
  • Good coding practices and variable name convention

Lesson 2

Branching your code. This lesson shows:

  • If - Else branching
  • If - Else If - Else branching
  • Logical, relational and equality operators
  • Precedence rules
  • Switch branching
  • Conditional expressions
  • Float Comparison

Lesson 3

Loops. This lesson shows:

  • While loops
  • For loops
  • Nested loops
  • Break and Continue

Lesson 4

Arrays and Strings. This lesson shows:

  • Simple arrays
  • Vectors
  • 2D and ND arrays
  • Char arrays
  • Strings

Lesson 5

User defined functions and subroutines. This lesson shows:

  • Functions and subroutines
  • Unit testing
  • Pass by reference
  • Local and global variables
  • Function definition and declaration
  • Function overloading
  • Function with defaults
  • Header files and modular compilation

Lesson 6

Objects. This lesson shows:

  • Definition of a class
  • Constructors
  • Destructors
  • Operator overloading

Lesson 7

Pointers. This lesson shows:

  • Pointer declaration and definition
  • Null Pointer
  • Operators new and delete
  • Memory regions
  • Access (->) operator
  • Valgrind
  • Allocation and deletion of arrays

Lesson 8

Streams. This lesson shows:

  • Input and output streams
  • Formatting the output
  • String streams
  • File streams

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published