Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 552
  • Last Modified:

Objective-C vs C/C++

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
mrjoltcola
Asked:
mrjoltcola
  • 2
2 Solutions
 
AGoodKeenManCommented:
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
 
fridomCommented:
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
 
mrjoltcolaAuthor Commented:
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
 
mrjoltcolaAuthor Commented:
Did not have the iphone specific info I was looking for, but I appreciate the answers.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now