I am trying to run my old .cpp files with double clicking on them to get opened by xcode. But when the code opens in the xcode editor no Run option exists. I tried to wrap my head around it and the only solution I found is to create a new project and then adding this file to that. What should I do?
1 Answer
You can't run a .cpp file by Xcode without adding it to a project.
if you want to run a .cpp file without creating a project.You can just use terminal and find the directory of your file,enter: g++ a.cpp
1 Comment
Lewis Levin
Annoying. For quick run and go, try CodeRunner. Way fewer features than Xcode or most editors (like VS Code) or IDEs but really simple for experimenting.
Makefileto compile them from the command line.