本文介绍了c ++,objective-c和objective-c ++之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道c ++和objective-c和objective-c ++之间的区别。
任何一个可以给我的区别,我们可以使用c ++的iPhone开发

I want to know the difference between c++ and objective-c and objective-c++.Can any one give me the difference and Can we use the c++ for iPhone development

谢谢你,
Madan Mohan

Thank you,Madan Mohan

推荐答案

C ++是Bjarne Stroustroup的基于向C添加类和元编程的语言,它将大多数额外的工作放入编译器,并且尽可能少

C++ is Bjarne Stroustroup's language based on adding classes and metaprogramming to C in such a way that puts most additional work into the compiler, and relies on least possible effort at runtime.

Objective-C是Brad Cox的语言,它基于向C添加一个SmallTalk风格的动态消息传递运行时库,并添加了少量的语法使得它更容易使用。

Objective-C is Brad Cox's language based on adding a SmallTalk-style dynamic message-passing runtime library to C, with a small amount of syntax addition to make it easier to use.

Objective-C ++,坦白地说,当你添加Objective-C运行时和语法到C ++时,你得到什么。它有它的局限性(例如,你不能创建一个C ++类的Objective-C子类,反之亦然,而Objective-C不喜欢C ++命名空间),但允许你使用Objective-C对象的C ++类,反之亦然。

Objective-C++ is, to put it bluntly, what you get when you add the Objective-C runtime and syntax to C++. It has its limitations (e.g. you can't create an Objective-C subclass of a C++ class or vice versa, and Objective-C doesn't like C++ namespaces) but allows you to use C++ classes from Objective-C objects and vice versa.

您可以在iPhone开发中使用Objective-C ++。这实际上意味着你可以编写一个应用程序的对象模型是完全C ++,控制器层需要接口到Objective-C,以使用Cocoa Touch API。

You can use Objective-C++ in iPhone development. What this means practically is that you could write an application whose object model was entirely C++, where the controller layer would need to interface to Objective-C in order to use the Cocoa Touch APIs.

这篇关于c ++,objective-c和objective-c ++之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 11:52