int main()
{
ofstream fout("test.txt");
//suppose I write a line "hello world" into the text file
getch();
return 0;
}
when I run the program . after writing the line into the file I don't see any effect in the file .But after the getch() line or finishing the program I can see the written data into my hard disk file . Why this happen . why it needs to terminate or close the file to show effect of the written data into my file.