You said the first inFile.good () prints 1. This should mean the file is open OK. Since you said that βit works through the terminal, but not Xcodeβ in the tehMick message - what it costs - when I tested this, I encountered the following problem: my IDE (C ++ Builder) runs a program from the DEBUG directory (when You are in debug mode). I needed to place "sampleplanet" in the DEBUG directory or use a publicly accessible path that found a file like ".. \\ sampleplanet".
+MyProjectDirectory | mymain.cpp (Even though this is where I had the source file..) | sampleplanet +--DebugDirectory mymain.obj mymain.exe (the program runs out of this directory.)
As soon as I took care of the above problem, everything worked as expected using the above code and file. I checked the file in Notepadd ++ to confirm [CR] [LF] after each line. If you create the file on Linux, it probably only has [LF] (I did everything under Windows).
source share