Skip to content

This repo contains my roadmap for learning C++ from zero to hero.

License

Notifications You must be signed in to change notification settings

ratansingh98/CPP-Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learn CPP

Instruction

Unix based os with g++ command. For compiling use g++ <filename>.cpp and for execution use ./a.out

About C++

  • C++ is an object-oriented programming language. It is an extension to C programming.
  • C++ is a general purpose, case-sensitive, free-form programming language that supports object-oriented, procedural and generic programming.
  • C++ is a middle-level language, as it encapsulates both high and low level language features.

Usage of C++

By the help of C++ programming language, we can develop different types of secured and robust applications:

  • Window application
  • Client-Server application
  • Device drivers
  • Embedded firmware etc

1.Basics

  • print.cpp - Printing string program using iostream.
  • print1.cpp - Printing string without using namespace and iostream.
  • print1.cpp - Printing string without using stdio header.
  • dataType.cpp - Prints size of different data types.
  • integer.cpp - Prints size of different data types of integer.
  • integer1.cpp - Type conversion from binary to integer.
  • variable.cpp - Store values in different variables.
  • floatCaution.cpp - Things you should be careful about while using float values.
  • const.cpp - Demonstrated about const.
  • array.cpp - Demonstrated array type.
  • 2darray.cpp - Demonstrated 2D array type.
  • read.cpp - For reading inputs.
  • read1.cpp - For reading inputs using stdheader.
  • operators.cpp - Types of operators.
  • bitwise.cpp - Demonstrated bitwise operation.
  • condition.cpp - Different conditional statements.
  • postAndPre.cpp - Demonstrated post and pre increment of integer variable.
  • loops.cpp - Different types of loop.
  • loops1.cpp - Controlling loops execution (break and continue).
  • range.cpp - Iteration using range.
  • function.cpp - Demonstrated to create and call integer multiplication function.
  • functionOverloading.cpp - Demonstrated function overloading.
  • exit.cpp - To quit program.
  • file.cpp - Opening and writing file using fstream.
  • filer.cpp - Opening and reading file using fstream.
  • headerDemo.cpp - Demonstrated how to call user defined header function from main.
  • cpp2cpp.cpp - Communication of one cpp to another cpp, for execution use g++ cpp2cpp.cpp headers/function.cpp.
  • stringManipulation.cpp - Demonstration of applying string manipulation functions.
  • struct.cpp - Demonstration of struct.
  • cli.cpp - Command line arguments.
  • For Saving complied code - use g++ <filename>.cpp -o <outFilename>.
  • pointer.cpp - Demonstrated pointer and reference for memory access.
  • arrayPointer.cpp - Demonstrated array using pointer.
  • rangeAndPointer.cpp - Demonstrated array using pointer and range.
  • exception.cpp - Demonstrated try and catch block to catch exception.
  • memory.cpp - Demonstrated memory management using calloc,malloc and realloc.

2. Intermediate CPP

  • file.cpp - Demonstrated create, rename and delete file.
  • file2.cpp - Demonstrated reading and writing into file.
  • enum.cpp - Demonstrated concept of enum.
  • auto.cpp - Demonstrated concept of type inference using auto keyword.
  • stackAndHeap.cpp - Demonstrated concept of stack and heap in term of memory.
  • stackAndPointer.cpp - Demonstrated relation of structure and pointers.
  • function1.cpp - Demonstrated function who uses pass by value.
  • function2.cpp - Demonstrated function who uses pass by reference.
  • functionalPointer.cpp - Assigning address of function to a pointer variable.
  • nullptr.cpp - Demonstrated null pointer.
  • recursion.cpp - Demonstrated recursion function.
  • template.cpp - Demonstrated template functions which is a part of generic programming.
  • variadicAndRecursion.cpp - Demonstrated template functions which uses variadic(allow to have multiple inputs).
  • macros.cpp - Demonstrated macros.
  • lambda.cpp - Demonstrated different types of lambda functions.

3. Object Oriented Concept

  • Abstraction - Its main goal is to handle complexity by hiding unnecessary details from the user.
  • class.cpp - Demonstrated how to create student class with setters and getters.
  • this.cpp - This keyword is used for self referencing inside a class.
  • constructorOverloading.cpp - Demonstrated constructor overloading
  • accessSpecifier.cpp - Uses concept of encapsulation, demonstrated through public and private.(Except protected).
  • friend.cpp - Used setter and getters as friend function to a private variable.
  • destructor.cpp - Demonstration of how destructors work.
  • copyConstructor.cpp - Demonstration to override constructor, parameter constructor and copy constructor.
  • overloading.cpp - Demonstrated concept of method overloading.
  • multipleInheritance.cpp - Demonstrated concept of multiple inheritance.
  • virtual.cpp - Demonstrated the use of virtual keyword.

4. Advance CPP

  • qualifier - There are 2 type of qualifier :- Modification and life duration qualifiers
  • Modification qualifiers - There are 3 type of Modification qualifier :- Const, volatile, mutable
  • Life duration qualifiers - There are 3 type of Life duration qualifiers :- static, register, extern
  • const.cpp - Demonstrated const qualifier. Value of object or variable will remain constant through out.
  • volatile.cpp - Demonstrated volatile qualifier. Generally used for multi-threaded application
  • mutable.cpp - Demonstrated mutable qualifier. It permits modification of the class member declared mutable even if the containing object is declared const.
  • static.cpp - Demonstrated static qualifier. A static member is shared by all objects of the class.
  • register.cpp - Demonstrated register qualifier. It is generally used for making system drivers.
  • extern.cpp - Demonstrated extern qualifier. It let us access members from header file.
  • assertions.cpp - Assert will terminate the program if its argument turns out to be false.
  • gdb.cpp - Terminal Based debugger.
  • memCheck.cpp - Using valgrind to run memcheck on verify.cpp.
  • uniquePointer.cpp - Demonstrated unique smart pointer. Memory get free as scope ends and this pointers cannot have copy of them.
  • sharedPointer.cpp - Demonstrated shared smart pointer. Memory get free as scope ends and this pointers can have copy of them.
  • weakPointer.cpp - Demonstrated weak smart pointer. Memory get free as scope ends and this pointers can have copy of them.
  • moveSemantics.cpp - Demonstrated best way of swapping variable with better memory management.
  • functor.cpp - Demonstrated use of functor.

5. STL

  • vector.cpp - Demonstrated Vector data type.
  • list.cpp - Demonstrated list data type.
  • map.cpp - Demonstrated map data type.
  • sort.cpp - Demonstrated performing sort operation using STL
  • search.cpp - Demonstrated usage of STL for performing search operations.
  • partition.cpp - Demonstrated partition and stable_partition through STL.
  • transform.cpp - Demonstrated partition and stable_partition through STL. It is used to perform an operation on all elements.

6. Threading and makefile

  • thread_id.cpp - Obtaining id of thread process and number of threads available in cpu.
  • basic.cpp - Basics to use threading.
  • Makefile - Basics to use threading.

7. Algorithm

  • pattern - Consist code to print different types of patterns.
  • data structure - Consist code to data structures.
  • basic - Consist code to basic algorithms.
  • search - Consist code of searching algorithms.
  • sort - Consist code of sorting algorithms.

About

This repo contains my roadmap for learning C++ from zero to hero.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages