-
Working with linked lists in C++ using iterators, push back, insert, remove, and erasing duplicates
Running Source Code main.cpp
-
Using classes, constructors, destructors, and pointers in C++
Running Source Code main.cpp
-
Example of methods, encapsulation, and constructor in C++
Running Source Code main.cpp square.h square.cpp
-
Getting command-line user inputs and dealing with stacks (push and pop) in C++
Running Source Code main.cpp subtract.h subtract.cpp
-
Making an array with a “starting index” other than 0 in C++
Running Source Code main.cpp lbarray.h
-
Using malloc and overriding operators with a simple polynomial sorter, all written in C++
Running Source Code
-
Example of inheritance in C++
Running Source Code main.cpp square.h
-
Simple Calculator with command-line GUI in C++
Running Source Code main.cpp display.h display.cpp value.h value.cpp
-
Example of overriding operators in C++ using a class that deals with fractions
C++ allows for the ability to overwrite operators. This program shows an example using various operators in a class that deals with fractions. It also throws a runtime exception if a divide by zero is attempted. Running Source Code main.cpp fraction.h fraction.cpp
-
Abstract data types using typename in C++
C++ has some really great advantages over languages like Java. It allows for abstract data types using the keyword typename. In this simple program, I create a class called Array and pass to it a typename and an integer to declare its size. I’m then able to assign array elements a value that corresponds to…