The compiler does not only say "error" but explains also what is wrong and indicates the line number.
So read the error message and inspect the code at the mentioned line number and the lines before that (errors are sometimes detected later while sourced in a previous line).
If you don't understand the error message look it up in the compiler documentation or the web.
If you still got stuck asking here is fine. But you should include the full error message(s) and indicate the line(s) in your code snippet where they occurred. This would make it much easier to help you.
However, the first solution showed you already the problem:
for(int i =0;i<4;i++)