Tag Archives: beginners

Header files

“Header files, or .h files, allow related function, method, and class declarations to be collected in one place.”. This is useful as you can group together specific functionality and then export and use it at another place/file to be used by another program. There are 2 file extensions that we deal with “.h” and “.cpp”. The header… Read More »

File Streams in C++

This section could have been better. While not terrible, it misses alot in the hopes of not being too lengthy or verbose (my guess). So far cout has been used in order to print things referenced by variables, ints or strings to the console. The “cout” functionality has been provided by the iostream standard library.… Read More »

If-while statements in C++

If and while statements are pretty powerful as you can control when statement/statements of code are executed. Syntax: Example: While While statements allow you to execute a block of code till/while a condition is true Syntax: Example: Print out numbers 0-5 while i is less than or equal to <= 5

C++ functions

A function may contain 1 or more statements of code. When a function is called, the statements of code within a function block are executed. Syntax: When a function need not return anything, we use the “void” return type: Example: This is a simple function called printString that takes in 2 parameters of the string… Read More »