Skip to content

A collection of simple programs I made while learning C++.

License

Notifications You must be signed in to change notification settings

GamesTrap/LearnCPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learn C++

A collection of simple programs I made to learn C++.
Status: Build Status

Programs

  • SumCalculator
    • Calculates the sum of two integers
  • IntegerLimits
    • Displays integer limits
  • CIntegerLimits
    • Displays integer limits based on C language
  • Overflow
    • Produces an overflow
  • FloatLimits
    • Displays float limits
  • Accuracies
    • Displays accuracies of floating point numbers
  • Inaccuracy
    • Displays inaccuracy with float Arithmetic
  • MathExpressions
    • Calculates mathematical expressions
  • IsCharSigned
    • Displays if char is signed or unsigned
  • Scopes
    • Displays scopes of variables
  • RomNum
    • Converts Roman numeral(s) to int(s)
  • GDC
    • Displays GCD of two numbers
  • Prime
    • Calculates a prime number that follows a given number
  • FacCalculator
    • Calculates the faculty of a number >= 0
  • Menu
    • Displays a Menu made with break and continue
  • Enum
    • Program using enum(s)
  • Struct
    • Program using struct(s)
  • Vector
    • Program using vector(s)
  • DynamicVector
    • Program using vector(s) dynamically
  • StringOperations
    • Program with typical string operations
  • Auto
    • Program using auto(s)
  • StructBinding
    • ...
  • Union
    • Program using Union(s)
  • BitField
    • Program using BitField(s)
  • Input
    • Displays user input
  • FileIO
    • Creates a file and reads it
  • FileCopy
    • Reads a file and saves it with a different name
  • BoolAlpha
    • Displays if a char is captial or not
  • ANSIESC
    • Program using the ANSI ESC sequence
  • Hex2float
    • Outputs a float from a hexadecimal number
  • IfInitialization
    • ...
  • IntTypes
    • ...
  • ForEachLoops
    • Outputs a string and a vector with different foreach loops
  • FacCalculator2
    • Calculates the faculty of a number >= 0 with functions
  • Scopes2
    • Displays scopes of variables
  • Static
    • Program using a static variable
  • ByValue
    • Program using Parameter transfer by value
  • DigitSumCalculatorWithRecursion
    • Calculates digit sum of a number with recursion
  • TowersOfHanoiWithRecursion
    • Program to solve towers of hanoi with recursion
  • ByReference
    • Program using Parameter transfer by reference
  • Price
    • Outputs price(with predefined parameters)
  • FunctionOverloading
    • Program using function overloading
  • Macros
    • Program using macros
  • GCCVersion
    • Checks if you are using GNU C ++ Compiler and outputs its version
  • HasInclude
    • Program using __has_include macro
  • Macros2
    • Program using macros
  • Namespaces
    • Program using namespaces
  • Constexpr
    • Program using const(expr)
  • Constexprauto
    • Program using const(expr) and auto
  • BiggestValueWithTemplates
    • Outputs the biggest values of a vector using function templates
  • BiggestValueWithSpecialisedTemplates
    • Outputs the biggest values of a vector using specialised function templates
  • Smaller
    • Program using different functions and templates
  • Place
    • Program using class
  • PlaceWithCopyconstructor
    • Program using class and copy constructor
  • SequenceConstructor
    • ...
  • constexprConstructorAndMethods
    • Program using constexpr constructor and methods
  • Rational
    • ...
  • Destructor
    • Program using destructor
  • PersonnelAdministration
    • A simple personnel administration program
  • IterateCArray
    • ...
  • CStrArray
    • Program using CStringArray
  • MainParameters
    • Program using console/terminal parameters
  • This
    • Program using this pointer
  • 2DMatrix
    • Program using 2D array
  • OutputTable
    • Program using templates and multi dimensional arrays
  • 2DArray
    • ...
  • WriteBinaryFile
    • Writes 20 double values to a file with binary format
  • ReadBinaryFile
    • Reads file with binary format
  • WriteBinaryFile2
    • Writes an array matrix to a file with binary format
  • FunctionPointer
    • ...
  • QSort
    • ...
  • Typedef
    • Program using typedef
  • UniquePointer
    • Program using unique_ptr
  • String
    • ...
  • StringView
    • ...
  • NumObj
    • ...
  • ClassWithConstants
    • Program using Constants inside a class
  • SimulateStack
    • Program simulating stack
  • Inheritance
    • OOP
  • InheritConstructor
    • Program demonstrating how to inherit a constructor
  • AbstractInheritance
    • Abstract OOP
  • VirtualDestructor
    • Program using virtual destructor
  • PrivateVirtualFunctions
    • ...
  • VirtualBaseClass
    • Program using virtual base class initialization
  • Cast
    • Program using static_cast and dynamic_cast
  • TypeID
    • Program using typeid
  • PrivateInheritance
    • Program using private inheritance
  • Exstream
    • ...
  • LogicError
    • ...
  • Division0
    • ...
  • NewHandler
    • Program using my own new_handler
  • OperatorOverloading
    • ...
  • SimulateVector
    • Simulates a vector class
  • MathVector
    • ...
  • SmartPointer
    • Program using DIY SmartPointer class
  • FunctionObject
    • Example program for function objects
  • NewOverloading
    • Program using DIY overloaded new operator
  • CountMemoryManagement
    • ...
  • GuardMemoryManagement
    • ...
  • MemoryManagement
    • Example of a memory management
  • Matrix
    • ...
  • AssignmentComparisonInheritance
    • ...
  • RWSameFile
    • Reads & Writes in the same file
  • NumToString
    • Converts a number to a string using stringstreams
  • Table
    • Outputs a formatted table
  • RWVector
    • Reads & Writes a vector
  • RWArray
    • Reads & Writes an array
  • RWVectorMatrix
    • Reads & Writes a multi dimensional vector
  • WithoutSTL
    • Program using own STL functions
  • WithoutSTLTemplate
    • Program using own STL template functions
  • WithVector
    • ...
  • List
    • Implementation of a list(like std::list, but incomplete)
  • Performance
    • ...
  • LambdaSort
    • Sorts a vector using lambdas
  • LambdaFunction
    • Program using a lambda as a function
  • Squared
    • Program using a recursive template to output the square of n
  • PrimeNumber
    • Program using a recursive template to output all prime numbers from 0 to n
  • PrintVariadic
    • Program using a variadic template to output n amount of types passed to the template
  • PrintVariadicInt
    • Program using a variadic template with parameter expansion
  • RegexTester
    • ...
  • Chrono
    • ...
  • Thread
    • ...
  • ThreadGroup
    • Program using multiple threads with a ThreadGroup object
  • Worker
    • ...
  • ProducerConsumerProblem
    • Program showing how to solve the Producer -> Consumer problem in threading
  • ReadWriteThread
    • ...
  • AtomicVSNonAtomic
    • Program showing the difference of using a normal variable vs atomic variable with 100 threads