Solved

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

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

The Basics of Storyboard Storyboards were first introduced to developers in the release of iOS 5. They save the developer the trouble of designing each screen’s interface in a different file. The storyboard allows you to see the conceptual mockup o…
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.
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…

813 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

9 Experts available now in Live!

Get 1:1 Help Now