A good start in determining what's wrong is asking what it's doing versus what you expect it to do. So...what's it doing that's different from what you expected? :)
I see two problems in particular, one of which will be immediately obvious from the compiler's errors and the second will appear after fixing the first.
I'm not being obtuse, by the way. I'm trying to push you to learn how to figure out your own problems, which is a huge skill to have in programming.