I am attempting to open the current process's executable file for read-write operations (I have additional data attached to the executable), however std::fstream will not open the file in ios::in | ios::out | ios::binary mode, even though open() will (with O_RDWR flag set).
Does anyone know why std::fstream will not open the file, while open() will, and if so, how I can get std::fstream to open the file?