Viewing 36 to 42 of 51 items
Archive | C++ RSS feed for this section

Command Line Arguments

Command Line Arguments allow the user to run the program thruogh the terminal as well as pass in arguments into your program in one line. Most common use of command line arguments, are to pass in “strings” that represent file names from which you are going to read data from. Format of Command Line Arguments  Full Article…

0

Advanced Control Flow – The Do While Loop

The Do While Loop is a loop that guarantees execution of the statements within the loop at least once. The structure of the Do While Loop Below is the structure: do { //statements } while ( condition(s) ) ; What is this useful for? In order to execute a set of commands at least once.

0

Introduction to Functions

Functions allow you to perform the same operation on many inputs with one simple call. Why a function anyways? First of all, let’s see how we’d perform a certain task without one. How would we print out the entire contents of a vector each time we modified it? Let’s show how we would do it  Full Article…

0

Simple Data Structure – The Vector

The vector is a simple data structure that allows you to store values with the same data type in one container. Introduction Without the use of a data structure, how would you store multiple variables? Let’s say we wanted to store 5 names into strings. How would this be done? string name1,name2,name3,name4,name5; cin >> name1  Full Article…

6

Basic Control Flow Continued

By this time you should be familiar with the basics behind If and Else if statements. Below you’ll see more examples and more ways to use Control Flow in your programming. 1. You’ll learn more advanced ways of manipulating control flow in your program. 2. You’ll also learn how to declare and initialize boolean variables.  Full Article…

0