Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は XCode でプログラムを書いていますが、(プログラムをテストするために) 読み取る必要がある txt ファイルを XCode で見つけることができないようです。プログラムは g++ で適切にコンパイルおよび実行されます。
ありがとう、ジェイコブ
私は自分の質問に答えています.cppファイルと同じディレクトリにあるファイルを読み取る方法が見つかりませんでしたが、 cout << argv[0] と入力すると、実行可能ファイルのディレクトリが表示されました、そこにファイルを入れて実行しました。