[Solved] Why don’t people initialize i globally?
[ad_1] Excellent idea! Here’s a program that prints “hellohello” five times: int i; void print_twice(const std::string& s) { for (i = 0; i < 2; i++) { std::cout << s; } std::cout << std::endl; } int main() { for (i = 0; i < 5; i++) { print_twice(“hello”); } } Or… does it? (Ominous organ … Read more