You can define 2 variables of the same type in a for loop:
int main() { for (int i = 0, j = 0; i < 10; i += 1, j = 2*i) { cout << j << e
This one is also ugly, but provides also some general way for declaring multiple variables with some given name and types in a for-loop
int main() { for (struct { int i; float j; } x = { }; x.i < 10; x.i += 1, x.j = 2 * x.i) { cout << x.j << endl; } }