Posts
All the articles I've posted.
-
INT_MAX and INT_MIN in C++: The Maximum and Minimum int Value
The maximum value of an int in C++ is 2147483647 and the minimum is -2147483648. How to get them with INT_MAX, INT_MIN and numeric_limits, plus overflow traps.
-
How to Read a File Line by Line in C++
Updated:Read a text file line by line in C++ with ifstream and getline. Includes error handling, reading into a vector, parsing each line, and the common gotchas.
-
How to Read Multiple Inputs on One Line in C++
Read several values from one line in C++ with cin, getline and stringstream. Handle unknown counts, comma-separated input, and reading until the user stops.
-
How to Replace a Substring in a C++ String
Updated:Replace text inside a C++ string: replace one occurrence, replace all occurrences with a loop, and use std::string::replace by position. Copy-paste code included.