Tag: tutorial
All the articles with the tag "tutorial".
-
using namespace std in C++: What It Means and Why It's Discouraged
using namespace std lets you write cout instead of std::cout. What it actually does, the name collisions it causes, and the safer alternatives to use.
-
How to Open and Run a .cpp File (Windows, Mac and Linux)
A .cpp file is source code, so opening it won't run it. How to compile and run a .cpp file with g++, VS Code or Visual Studio, and fix the common errors.
-
How to Break Out of a Nested Loop in C++
break only exits the innermost loop in C++. Four ways to break out of nested loops: a flag, goto, extracting a function, and restructuring.
-
Getters and Setters in C++: How and When to Use Them
Write getters and setters in C++ for private class members. Covers const correctness, returning by reference, validation, and when to skip them.