Hello I'm currently working on a program that uses this type of code fstream fbin(textfilename, ios::binary|ios::out|ios::in)
The program later goes on to a switch statement allowing the user to read or write depending on a choice.
The problem I am having is that when creating the fbin object it's as though I need the file to be already created since im using the flag ios::in
is there a possible way to allow fbin.write(text, number) to work without a pre-existing file.
Thanks