let me fix your code a bit.
you can declare variables inside the argument of the for loop. you also need to include input output stream to be able to use cursor out.
using namespace std;
for (int i = 0, i < 10, i++)
cout << "Hello World!";
and u have to return something in your function