HF RL Explorer

Task: Implement Const Loop Variable Pattern in C++

Task: Implement Const Loop Variable Pattern in C++: a task in Terminal-Lego-15k (Harbor dataset). In C++, when using a standard for loop, the loop variable can be accidentally modified within the loop body, which can lead to bugs. Your task is to implement a solution that makes the loop variable…

The task

In C++, when using a standard `for` loop, the loop variable can be accidentally modified within the loop body, which can lead to bugs. Your task is to implement a solution that makes the loop variable `const` within the loop body while still allowing the increment statement to work normally.

Part of PrimeIntellect/Terminal-Lego-15k.