Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Newb Programming Question
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Lbatson21" data-source="post: 1259435" data-attributes="member: 169331"><p>When you start Xcode you have an option to choose a c++ project using the command line tool. From there it starts you out with a main.cpp file that you can rename and edit to fill in whatever code you want to run. the main.cpp file in there is actually a hello world example lol. Anyway, once you double click on the main.cpp and edit it you just need to save and there will be a button that says build and run that compiles and runs the program you just wrote. To view the program and interact (i.e. input info for user inputs) you will need to view the console, which is under menu option Run>Console, also command, shift R I think. This will pull up the window where Xcode runs the program and you will be able to watch it do whatever it does. I just installed Xcode this week myself and I'm sure there are some other more detailed directions but thats where I'm at so far. Hope this helps <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="Lbatson21, post: 1259435, member: 169331"] When you start Xcode you have an option to choose a c++ project using the command line tool. From there it starts you out with a main.cpp file that you can rename and edit to fill in whatever code you want to run. the main.cpp file in there is actually a hello world example lol. Anyway, once you double click on the main.cpp and edit it you just need to save and there will be a button that says build and run that compiles and runs the program you just wrote. To view the program and interact (i.e. input info for user inputs) you will need to view the console, which is under menu option Run>Console, also command, shift R I think. This will pull up the window where Xcode runs the program and you will be able to watch it do whatever it does. I just installed Xcode this week myself and I'm sure there are some other more detailed directions but thats where I'm at so far. Hope this helps :) [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Newb Programming Question
Top