Skip to main content

Programming

Input Basics In C++ Part 3 - Multiple Inputs and Calculations

Input Validation In Part 2 we covered some basic principles about standard input in C++, we talked about the input buffer stream, the iostate and some mechanisms that the C++ programming language provides us with to get input from users. We ended with a program that takes input from users and stores them, but that had the fatal flaw of only being able to store a single number, which really doesn’t make for a good calculator, does it? So here are a few changes.

Input Basics In C++ Part 2 - Streams, Flags and Validation

Input Validation

In Part 1 of this series I covered some C++ fundamentals by building a small unit converter. While the program worked, it had a critical weakness: it assumed the “happy path,” where users never make mistakes. In the real world, things are messy, and as programmers, we have to anticipate how our applications might fail. We can’t predict everything, but we can certainly guard against the most common issues.

Input Basics In C++ Part 1 - Introduction

Input Basics In your programming journey, have you ever reached a point where you feel overwhelmed with everything a language can do, leaving you unsure of what to learn first or which features are truly important? I find myself in that exact situation. With each new C++ standard, I feel like I’m falling behind. Here we are in 2025, and I’m still trying to master move semantics and how to best use smart pointers. Learning a language with a rich history like C++ can be grueling. I’ve noticed I often get mesmerized by what’s new, shiny, and exciting, causing me to neglect the fundamentals. That’s what this post is about: practicing some of the fundamentals of the language and its standard library. In this new series, I will explore the basics of the library.