I am using NetBeans and i just want to open a file but it doesn't work.
I have got my main.cpp and next to it my file.
The output is "Failed".
Thank you for helping a beginner.
Where is your executable located? That's what matters, not your .cpp file. Make sure your resource is in the same place as your executable, or provide an absolute path for the file.
Edit: Also, if NetBeans default settings are anything like CodeBlocks, it might be trying to get resources from where the project file is, not the executable, so check if your IDE has a "resource path"/"working directory" option or something.