C++ files
hai sir
i have doubt in File operations in C++ write a program to add items to a file and display items from it it will not work properly it is added items into file and specified datafile is not created when it dispaly items it only display the last entery that is added to the file (the while loop is not used case) the read() function is used in while loop it will not display anything sir please give me solution for this problem |
Writing to a file normally replaces the contents of the file. That could be your problem. Although without any more information it is difficult to be certain.
I'd suggest that you attack your problem in stages.
graeme |
Quote:
are you opening and shutting the file after ever loop? whats your file open flags? |
All times are GMT -5. The time now is 05:24 PM. |