Solved

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

Posted on 2011-03-13
3
894 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

The release of the iPhone 6 and iPhone 6 Plus was a complete game changer for Apple. Steve Jobs had even showed his distaste for larger phones, calling them “Hummers”. But to compete with larger smartphones, Apple finally introduced the iPhone 6 wit…
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
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.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

687 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