Lesson 16: Case Study- Calculator with Switch statement

[spoiler title=”Lesson Video”] Direct Download of Video (For mobile / offline viewing)(right click > save target as) [/spoiler] [spoiler title=”Lesson Source Code”] #include #include using namespace std; int main(){ //Switch Statements to build a calculator int choice = 0; char operation = ' '; double firstNum = 0.0, secondNum = 0.0, outcome = 0.0; cout... » read more

Lesson 17: Data validation / Type checking with StringStream

[spoiler title=”Lesson Video”] Direct Download of Video (For mobile / offline viewing)(right click > save target as) [/spoiler] [spoiler title=”Lesson Source Code”] #include #include #include //If you type this and get an error your stuff is too old using namespace std; int main(){ string str = ""; int value = 0; bool cont = true;... » read more

Lesson 18: Introduction to Functions

[spoiler title=”Lesson Video”] Direct Download of Video (For mobile / offline viewing)(right click > save target as) [/spoiler] [spoiler title=”Lesson Source Code”] #include #include using namespace std; int addNumbers(int, int); //Function Prototype int main(){ //Homework -- Create a function that allows 2 variables to be set to it, multiply them together, output the result, return... » read more

Lesson 19: Functions, return types, pass by value / reference

[spoiler title=”Lesson Video”] Direct Download of Video (For mobile / offline viewing)(right click > save target as) [/spoiler] [spoiler title=”Lesson Source Code”] #include using namespace std; int addFive(int); int addFiveRef(int&); void addFiveToAll(int[]); int main(){ int x = 0; //Homework //Using an array of strings for days of the week and an array for days (your... » read more

Lesson 20 — Introduction to Objects (classes) and Constructors

[spoiler title=”Lesson Video”] Direct Download of Video(For mobile / offline viewing)(right click > save target as) [/spoiler] [spoiler title=”Source Code”] #include using namespace std; //struct //class class car{ public: int windows; int wheels; double fuelEconomy; //Miles Per Gallon // Litres per Kilo void figureMPG(double milesDrivem, double gallonsOfGas){ fuelEconomy = milesDrivem / gallonsOfGas; } car::car(); car::car(int,... » read more