What errors and warnings are you getting from the compiler?
Note that a for statement is of the form
for( init conditions ; term conditions ; increment ) ...
So it expects 2 semicolons!
Andy
P.S. #include <fstream.h> suggests you are using a ancient compiler. Nowadays people use the modern <fstream> (there are no .h file exts for the standard library headers)