简体   繁体   中英

Using Xcode to create a single .cpp file

I want to use Xcode to create a single cpp file to do my assignment, instead of creating a whole project with several files and directories, is there anyway to do it? Thanks.

Create a command line app at the start, it may still generate some other things but it should give you what you want. You can also use xcode as solely a text editor and still get some of it's features

For that purpose don't use XCode.

Just create cpp file with text editor (GUI text editor or command line vi, vim, etc...)

And compile it

 g++ mysource.cpp -o mysource.out

and run

 ./mysource.out

If you want to use some syntax highlighting you have to use more complex text editors or plugins. For debugging it's better to use XCode or any other IDE.

More features bring more performance drain.

You should try both options and decide which one to use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM