Solved

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

What's a UDID? If you're involved in developing, testing, or even reviewing an iOS application that's in beta, then at some point you may need to know the UDID for any iOS devices that you'll be testing on. What's the UDID? It stands for Unique Dev…
When Apple released Swift last year, the aim was to introduce a new programming language for Cocoa and Cocoa Touch that was fast, easy and effective, like the name connotes. Apple succeeded. Swift is designed to couple with Objective-C program…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
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.

757 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

18 Experts available now in Live!

Get 1:1 Help Now