Coding with Loops
Today we did a live coding demonstration of loops, using them to calculate the stats for baseball. The key to coding is to start small, and go slow, testing and growing your code every step of the way. The single biggest mistake new programmers make is to try coding a complicated bit of code from scratch and then be puzzled when something doesn't go well. Today is a good example of how you should be coding right now.
We also talked about static_cast and why it's maybe better than other forms of casting, the use of size_t, and integer division again.
I also introduced readlib (available on Github) which replaces cin with a read() function that just works a lot better, as well as some iomanip options such as setprecision and fixed which you can use to format your floating point numbers the way you want.
Other Videos By Bill Kerney
2021-09-03 | Functions in C++ Part I |
2021-09-03 | Five Theories of Truth |
2021-09-02 | UE4 Blueprints |
2021-09-02 | Set Theory I |
2021-09-02 | The Laser Zombies |
2021-09-01 | Integer Overflow, String Comparisons, Range-Based For Loops, Nested Loops |
2021-09-01 | Truth Part 1 |
2021-09-01 | Landscapes Part I |
2021-09-01 | Project Updates |
2021-08-31 | Hash Tables + Counting |
2021-08-30 | Coding with Loops |
2021-08-30 | How to Make an Argument and Counterargument - Piracy: For and Against |
2021-08-27 | For and While Loops |
2021-08-27 | Examining Sources |
2021-08-27 | Gaming Psychology and Lerping Materials |
2021-08-27 | Hash Tables |
2021-08-25 | Handling Errors, Cheating, Competency Exams, Chars, Loops |
2021-08-25 | Evaluating Claims |
2021-08-25 | Final Project!!?! |
2021-08-24 | UE4 Material Instances |
2021-08-24 | RSA Encryption Part 2, Computer Security |