Hi,
I need to know whether I can write the whole class in C++ and use it in XCode using Objective-C?
I need to write a code to query HTML using POST method and I think the best approach is to use either C++ or C#.
Umair
Hi,
I need to know whether I can write the whole class in C++ and use it in XCode using Objective-C?
I need to write a code to query HTML using POST method and I think the best approach is to use either C++ or C#.
Umair
C++, yes. C#, no.
Objective-C is an extension of C and can transparently interoperate with C++.
Unless you have some existing HTTP library that you want to recycle, I would suggest exploring the options built into the system first. There are a bunch of stackoverflow questions on the subject.
Yes you can, with C++ that is. From the chapter "Using C++ With Objective-C" in Apples "The Objective-C Programming Language" document:
Apple’s Objective-C compiler allows you to freely mix C++ and Objective-C code in the same source file. This Objective-C/C++ language hybrid is called Objective-C++. With it you can make use of existing C++ libraries from your Objective-C applications.
Basically all you have to do is use the file extension .mm
and then you may mix Objctive-C and C++ freely (see the chapter linked to above for some exceptions).