Solved

Can I use C++ to program iphone on xcode ?

Posted on 2011-03-13
3
889 Views
Last Modified: 2012-05-11
Hello Guys,

I'm trying to learn objective-C but it's so different to me, and you have to be really good memory management unlike other languages where I never worried that much about memory before.

Anyway, Can I just develop iPhone Apps using C++ ?

Please be detailed in your answer.
0
Comment
Question by:heiba
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Expert Comment

by:gawhemant
ID: 35125823
Hello,
Try this out
1. Open XCode.
2. File/New Project...
3. In the "New Project" Assistant, expand the "Command Line Utility" group.
4. Select "C++ Tool"
5. Click "Next"
6. Give a project name and directory, then click "Finish".
7. Press Cmd-Shift-R to open the Console window. Output will appear there.
8. Click the "Build and Go" toolbar button.
This following link and videos also might prove helpful to you..
Videos:
http://www.youtube.com/watch?v=ZV6ObxDm9cY  (calculator in C++ in Xcode)
http://www.youtube.com/watch?v=JHrvKE1bXdU 

Links Which will help you out.
http://answers.oreilly.com/topic/631-how-to-get-c-and-objective-c-to-play-nicely-in-xcode/
http://iphonedevelopertips.com/cpp/c-on-iphone-part-1.html
Regards,
Hemant
0
 

Author Comment

by:heiba
ID: 35132574
@gawhemant

Thanks for your reply and for the great info on C++ in XCode, but I was looking for information on actually programming iphone apps using C++. I checked the links you gave me but they didn't say much.

Why would I have to use Objective-C ? Can I build a whole app using C++ ? what technical constrainst would using C++ put on me ?

Thanks
0
 
LVL 3

Accepted Solution

by:
gawhemant earned 500 total points
ID: 35135351
Hello,

Short answer, yes, sort of. You can use Objective-C++, which you can read about at Apple Developer Connection.
Go through the following link...

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocCPlusPlus.html

If you know C++ already, learning Objective-C would be pretty simple, if you decided to give that a try. More info on that topic is at the ADC as well.

Regards,

Hemant
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
Email is way too noisy, prone to hiding the important stuff, and really becoming unreliable for critical/timely communications. There are better ways to communicate.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question