refactor the code for arbitrary file access
I need to help for rebuild my cod for arbitraty file access. Cause i dint know what to do, and didnt understand what difference between them. And need to rebuild it for my study. My cod below:
File Appending in C++
I want to append to a .txt file, adding directly after the last character in the file without going to a new line. How can I do that? If the file is empty, write at the beginning of it.
I’m having trouble printing lines read from file in C
I have a file named DB.txt, I read lines in a for loop and print those lines out but the ting is nothing prints out. I think it’s important to mention that I’m coding in CLion on MAC because there were always some issues when I worked with files (e.g. I tried to write into a file but instead of what I inputed I always got trash in this file33)