I NEED to know how to use the CodeBlock program on my Apple iMac laptop so that
ID: 3737928 • Letter: I
Question
I NEED to know how to use the CodeBlock program on my Apple iMac laptop so that a c++ program will open.file a txt file. Currently the system does not do that. After selecting "build and run" for the c++ program, the CodeBlock creates an exec file in the same folder as the saved c++ program file. When I run (double click on) the newly created exec file, the results always ends up with "File not found". As an aside this c++ program works as advertised on a Windows based computer.
Is there a step by step process to have the CodeBlock program open the txt file on an iMac computer?
I am new to iMacs so please keep explanations simple.
FYI, in the previous post that I made about this subject, someone said to use a totally different compiling program...Sublime Text...I tried it and the same exact results occured.
Thank you in advance.
Explanation / Answer
File not found error is not due to compiling issue.
Your code not able to find the file that you want to open.
Try to copy the .txt file in the same folder in which .exe file exists and run the program and if you do not want to put text file in the same folder then provide the complete file path to open the file. Don't forget to mention file extension as well.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.