I know by writing thisa file name Student_data.txt will store in C drive. But how do I store the file in the directory of the program run or current directory? Thanks in advanceCode:ofstream school_file ("C:\\Student_data.txt")
I know by writing thisa file name Student_data.txt will store in C drive. But how do I store the file in the directory of the program run or current directory? Thanks in advanceCode:ofstream school_file ("C:\\Student_data.txt")
Remove the C:\\ part.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Thanks