I prefer the second one, (i == 0), because it feel much more natural when reading it. You ask people, “Are you 21 or older?”, not, “Is 21 less than or equal to your age?”
More Related Contents:
- “std::endl” vs “\n”
- #pragma once vs include guards? [duplicate]
- return statement vs exit() in main()
- What open source C++ static analysis tools are available? [closed]
- Is pass-by-value a reasonable default in C++11?
- Correct way of declaring pointer variables in C/C++ [closed]
- What is the most effective way to get the index of an iterator of an std::vector?
- int vs const int& [closed]
- Is calling destructor manually always a sign of bad design?
- A free tool to check C/C++ source code against a set of coding standards? [closed]
- Using “super” in C++
- How do I get the index of an iterator of an std::vector?
- Checking for NULL pointer in C/C++ [closed]
- C++ getters/setters coding style
- Tools to find included headers which are unused? [closed]
- When should you use the “this” keyword in C++? [duplicate]
- Iterate through a C++ Vector using a ‘for’ loop
- Advantages of std::for_each over for loop
- When to use an elaborated type specifier
- What are your favorite C++ Coding Style idioms [closed]
- What is the best way to do input validation in C++ with cin?
- Infinite loops – top or bottom? [closed]
- How can I avoid including class implementation files?
- In C++, is it still bad practice to return a vector from a function?
- Isn’t the const modifier here unnecessary? [duplicate]
- Why do some experienced programmers write comparisons with the value before the variable? [duplicate]
- Default parameters with C++ constructors [closed]
- c++ standard practice: virtual interface classes vs. templates
- What is the difference between if (NULL == pointer) vs if (pointer == NULL)?
- #ifdef vs #if – which is better/safer as a method for enabling/disabling compilation of particular sections of code?