cccc
Last edited on
line 13: file is undefined. Did you mean infile? BTW, this if statement is unnecessary. You haven't performed any operations on infile.
Line 14: You trying to open a file named file_nm. not the file name entered by the user. You don't test that this open succeeded.
Line 15: infile.eof is a function. () are required to call a function. Your test for eof() is in the wrong place. It should be after the getline.
Line 35: open takes a C-string, not a std::string.
Line 36: ENTRY is undefined. Did you intend txt?
Line 42: l is uninitialized. Result of the switch statement is undefined.
if (file.good())
You do not have any variable called file.
while(!infile.eof)
there is no data member eof. There is member function eof() however.
getch();
You did not include header to use it. Anyway it is nonstandard and can simply be not supported by your compiler.
outfile.open(file_nm, std::ios_base::app);
You might be using old compiler which not allows std::string as parameter. Use file_nm.c_str() instead.
outfile <<ENTRY;
There is no variable ENTRY in your code.