Given a list of arbitrarily many strings, show how to: test if they are all lexically equal test if every string is lexically less than the on
Continue ReadingC++: Execute a Markov Algorithm
Create an interpreter for a Markov Algorithm. Rules have the syntax: <ruleset> ::= ((<comment> | <rule>) <newline>+)* <c
Continue ReadingC++: Memory Layout of a Data Structure
It is often useful to control the memory layout of fields in a data structure to match an interface control definition, or to interface with hardware.
Continue ReadingC++: Define a Primitive Data Type
Demonstrate how to define a type that behaves like an integer but has a lowest valid value of 1 and a highest valid value of 10. Include all bounds ch
Continue ReadingC++: Include a File
The task is to demonstrate the language's ability to include source code from other files. In C and C++, inclusion of other files is achieved via a
Continue ReadingWhy is processing a sorted array faster than an unsorted array?
Here is a piece of C++ code that seems very peculiar. For some strange reason, sorting the data miraculously makes the code almost six times faster.
Continue ReadingC++: Increment a Numerical String
This task is about incrementing a numerical string. // standard C++ string stream operators #include <cstdlib> #include <string> #in
Continue ReadingC++: Sort a Range of Elements
On line 8, we create a std::array of ints that we wish to sort. On line 10, we call the standard alrogithm std::sort, which sorts the range of elem
Continue ReadingC++: Execute a System Command
In this task, the goal is to run either the ls (dir on Windows) system command, or the pause system command. Works with: Visual C++ version 2005 sys
Continue ReadingC++ Full Course Lesson 5: Creating a Basic Calculator
https://www.youtube.com/watch?v=yjucJUsHSqg&list=PLAE85DE8440AA6B83&index=5
Continue Reading