3 ms·
It's not foolproof, though. Take a beginning C++ programmer who heard that type inference is all the rage now: for (auto i = strlen(str); --i >= 0;) and y
by ygra 13y ago
It's not foolproof, though. Take a beginning C++ programmer who heard that type inference is all the rage now:
for (auto i = strlen(str); --i >= 0;)
and you got yourself an infinite loop. One that isn't so easy to see or diagnose either, unless you know that strlen returns size_t. Which a beginner might not.