I'm working on a C++ project with XCode, at one point in my code I call shader.open (m_FilePath, std::ios::in);, shader being an ifstream variable and m_FilePath a std::string in which the shader's file path is stored.
Later in my code, when I call shader.fail () it return true unless I provide the full path in m_FilePath.
I already changed the project's directory to be the folder where the file resides, added the file refence to the project and to Copy Files in the target's build phases, setting the destination as "Products directory", but I'm still unable to use a relative file path.
What am I doing wrong? Currently using XCode 9.4.1 on MacOS High Sierra 10.13.6.