Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Native iOS email app question 7 41
Sleazy "In app" purchase? - Pro Camera iphone app 10 64
iOS Memory Management app 5 37
Deleting thousands of photos from icloud 6 41
iCloud Drive was introduced after iOS 8 was launched last year. This drive is Apple’s online storage device that lets users sync their files and access them from all their Apple devices.   There is a lot of data that is not automatically backed up…
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now