What I had to do to make it compile:
Change void main() to int main().
Add usingnamespace std;.
Change #include<fstream.h> to #include<fstream> .
Define a function called clrscr which clears the screen. (Because conio.h is deprecated.)