Latest Code Tutorials

C++ Tutorial

C++ is a general-purpose programming language and widely used nowadays for competitive programming. It has imperative, object-oriented and generic programming features. C++ runs on lots of platforms like Windows, Linux, Unix, Mac, etc.

C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. This C++ tutorial adopts a simple and practical approach to describe the concepts of C++ for beginners to advanced software engineers.

Basics of C++

C vs. C++

  • Undefined Behaviour in C and C++
  • Difference between Structures in C and C++
  • void * in C vs C++
  • Type difference of character literals in C vs. C++

C++ vs. Java

  • Inheritance in C++ vs Java
  • Static keyword in C++ vs Java
  • Default virtual behavior in C++ vs Java
  • Exception Handling in C++ vs Java
  • Foreach in C++ vs Java
  • Templates in C++ vs Generics in Java
  • Foreach in C++ vs Java
  • Floating Point Operations & Associativity in C, C++, and Java
  • Similarities between Java and C++

Object-Oriented C++

C++ Control Statements

C++ Input and Output

  • C++ Basic Input/Output
  • Clearing The Input Buffer
  • cin in C++
  • cout in C++
  • iostream in C++
  • How to use getline() in C++ when there are blank lines in the input
  • scanf() and fscanf() in C
  • What does buffer flush mean in C++

C++ Operators

  • Operators in C++
  • Unary operators in C++
  • Conditionally assign a value without using conditional and arithmetic operators
  • Execution of printf with ++ operators
  • Set a variable without using Arithmetic, Relational or Conditional Operator
  • Scope Resolution Operator vs. this pointer
  • Pre-increment (or pre-decrement)
  • new and delete operator in C++
  • CHAR_BIT in C++
  • Casting operators

C++ Array and String

  • C++ Multidimensional arrays
  • C++ Raw string literal
  • C++Converting a string to a number and vice versa
  • C++ Find the size of the array in C++ without using sizeof
  • C++ reverse string
  • Tokenizing a string in C++
  • C++ Getline() function and character array
  • Convert string to char array in C++
  • How to create a dynamic 2D array inside a class in C++
  • Char* vs std:string vs char[] in C++
  • C++ Std::lexicographical_compare()
  • C++ Std::string::at
  • C++ Std::substr()
  • std::stol() and std::stoll() functions in C++
  • Extract all integers from a string in C++
  • Strchr() function in C++
  • Strcat() vs strncat() in C++
  • Strncat() function in C++
  • Strpbrk() in C++
  • strcoll() in C++
  • Strchr() function in C/C++


C++ Sorting

C++ Vector

  • C++ vector at()

C++ Template Class

  • C++ Function Template


Advanced C++ topics

Comments are closed.