Solved

Objective-C vs C/C++

Posted on 2009-07-03
4
522 Views
Last Modified: 2013-11-25
What libraries / APIs are available in Objective-C

We have a wealth of existing code assets in standard C++.

Do the following exist in Objective-C

1) C++ STL
2) C stdio
3) C++ iostreams

Thanks,

mjc
0
Comment
Question by:mrjoltcola
  • 2
4 Comments
 
LVL 5

Assisted Solution

by:AGoodKeenMan
AGoodKeenMan earned 200 total points
ID: 24774524
Using the STL in Objective-C requires that you switch the file to use Objective-C++ by changing the file ending to .mm. After that you can import the various STL libraries normally: #import <vector>.
However I am not 100% on whether this applies to iPhone development or not, you might do better to signup to the developer program and search the developer forum, you are more likely to hook the right person.
0
 
LVL 24

Accepted Solution

by:
fridom earned 300 total points
ID: 24791507
AGoodKeenMan has some points. But AFAIKT it probably will just hold for Apple computer. So I'd like to answer you questions more directly
1) no (it's C++)
2) yes (Objective C is a superset of C)
3) no (it's C++)

And yes there exists such a beast as Objective-C++....

Regards
Friedrich

0
 
LVL 40

Author Comment

by:mrjoltcola
ID: 24794056
Thanks to both. I am wondering what I will have available to me when I try to port an app to iPHone. I have existing code that uses STL.

I am waiting for an actual Mac Pro, so I cannot test yet.
0
 
LVL 40

Author Closing Comment

by:mrjoltcola
ID: 31599636
Did not have the iphone specific info I was looking for, but I appreciate the answers.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unable to start eclipse ? 17 141
Computer slow / BSOD 10 59
delete-remove 14 85
iCloud photo stream 4 16
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…
Are you looking to clear some space on your phone for the latest iOS 8 update? Did you switch to Spotify so you no longer need to keep music native on your phone? Run out of space for taking photos while in the middle of vacation? Sometimes the quic…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

770 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