when i open text files with the fstream using ofstream or ifstream they work fine if i enter unique names or names already found in the directory/folder...
now when i do binary files i can never open them...
the program compiles and runs correctly, but i just can seem to open a file.
is there a suffix i need to use?
like bin?
hi.bin for binary
Filenames, extensions included, are no more meaningful than variable names.
Even if the file is binary, opening it as text shouldn't fail. It would only do a newline translation and a few other things.
To open a file as binary: std::ifstream file("filename",std::ios::binary);