Form http://topic.csdn.net/u/20091212/14/eed674bc-b074-4269-8450-f9ca659103c0.html
1. The biggest difference: all are object-oriented languages evolved from C.
2. The biggest difference is that C ++ is a static language, while OC is a dynamic recognition language? OC provides a dynamic binding mechanism during runtime.
In oC, the message is sent to an object. It does not matter if the object cannot process the message.
In C ++, Crash.
3. Inheritance: OC does not support multiple inheritance.
4. 4. function name resolution is also different. Objective C's function name resolution is based on the function name + parameter name, while C ++ only includes the function name. therefore, the following are valid in Objective C, because the two are parsed to be similar to FOO: bar1 and foo: bar2, respectively;
-(INT) Foo :( INT) bar1;
-(Char *) Foo :( INT) bar2;
In C ++, the following statements are invalid. compilation errors occur because the two statements are similar to FOO: int, which cannot be identified by the compiler.
Int Foo (INT bar1 );
Char * Foo (INT bar2 );
5. Objective-C does not have any constructor and destructor in C ++. Its counterpart is alloc-init/free.
6. Objective-C 2.0 is added to the garbage collection mechanism (unavailable on iPhone and iPad), while C ++ does not.
7. Objective-C does not allow memory allocation on the stack. It can only be performed on heap, while C ++ supports both.
8. Objective-C does not support references, but C ++ does.
9. Objective-C does not support templates, but C ++ does.
10. Objective-C belongs to the Smalltalk system, while C ++ belongs to the simula system.
In this case, objective-C is simply packaged on top of C, while C ++ is complicated on top of C ++, however, objective-C makes people feel more elegant and concise.