The Standard C++ Library: IOStreams

You can do much more with the general I/O problem than just take standard I/O and turn it into a class.The iostreams classes are usually the first part of the C++ library that new C++ programmers learn to use. This chapter discusses how iostreams are an improvement...

Birthday Reminder

This graphics program reminds you of peoples’ birthdays. [code language=cpp]/******************************************************* * MYCPLUS Sample Code – https://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is...

Miltiple Inheritance

The basic concept of multiple inheritance (MI) sounds simple enough: you create a new type by inheriting from more than one base class. The syntax is exactly what you’d expect, and as long as the inheritance diagrams are simple, MI can be simple as well. Or...

The Standard C++ Library: Generic algorithms

Algorithms are at the core of computing. To be able to write an algorithm once and for all to work with any type of sequence makes your programs both simpler and safer. The ability to customize algorithms at runtime has revolutionalized software development.The subset...

Number Conversions

This is another one of my numerical analysis university assignments. It is an extension of binary to decimal conversion code. The program converts a number in any base to a number in any other base. The user inputs the original number, the base it was written in and...

Exception Handling

Error recovery is a fundamental concern for every program you write, and it’s especially important in C++, in which one of the goals is to create program components for others to use. To create a robust system, each component must be robust.The goals for...

The Standard C++ Library: Strings

Standard C++ not only incorporates all the Standard C libraries (with small additions and changes to support type safety), it also adds libraries of its own. These libraries are far more powerful than those in Standard C; the leverage you get from them is analogous to...

Phil Sykes

This is a class which has a member function that takes 3 arguements – std::string thestlstring, int base, and int base2. the function converts a number stored in the form of an std::string from the first base to the second. Bases 2 – 16 are supported....

Information Hiding

Example of a program with a little information?hiding contained in it. C++ /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided...

Find the longest common sub-sequence between two strings

This programme finds the longest common sub-sequence between two strings. It implements the most famous dynamic programming algorithm. Output is a null-terminated string, so must be the input This package is provided as is with no warranty. The author is not...

Optimal Pair-wise Sequence Alignment

Optimal Pair-wise Sequence Alignment It implements Smith-Waterman with affine gap penalties. It requires at least one blank line between the two sequences. Ignores input lines with non-alphabetical characters This program is provided as is with no warranty. The author...