I have the below piece of code which reads a file line by line and prints the contents to another file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
inActive_pmc.open (active_pmc); // active_pmc is a file with some contents
while(!inActive_pmc.eof()) // To get you all the lines.
memset (finalLine, '\0', sizeof(finalLine));
cout << finalLine <<endl;
The problem is the control is not coming out of this loop at all. And also it is not printing any contents of the file too. It just keeps printing empty lines. Any inputs on this?? Please help.