This programming challenge, 2 Report Heading, asks us to create a program that outputs the heading for a company report. We need to create a header, implementation and client file. If you’re not familiar with these three different files, check out my blog about programming challenge 7-1 Date. First, I created the header file, this is […]
You are browsing archives for
7.1: Date – Class Constructors, Header Files & Default Parameters
Class constructors, header files and default parameters took me far to long to get the hang of. Header files, as you already know, are referenced using the “#include” at the beginning of programs. Header files end with a “.h”. Distinct from header files, source files for C++ end with “.cpp”. Sources files are compiled and […]
C++ fstream and Reference Variables: Counting the Letter Frequency from ...
C++ has three options to read data from a file — ifstream, ofstream and fstream. To input, or read data, use ifstream. To output or write data, use ofstream. The most versatile, fstream, allows both reading and writing data. For this program, I was asked to count the frequency each letter of the alphabet appears […]
C++ Iterating through a Char Array with For Loop – Counting Vowels & Con
Iterating through a char array can all be a bit daunting at first. Having started coding with Python, I was use to flexible string variables that did a lot of work on their own. C++ gives the programmer more direct control over character arrays, or strings. This program focuses on iterating a char array with […]