Objective-C和指针 [英] Objective-C and Pointers

查看:93
本文介绍了Objective-C和指针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解指针,知道它们是什么以及如何声明它们.但是,问题在于,所有书籍,教程或指南都没有真正解释为什么使用指针.

I understand pointers and know what they are and how to declare them. But, the problem is, none of the books, tutorials or guides actually explain why pointers are used.

我来自PHP背景,没有使用指针.因此,当我声明一个字符串时,我不使用指针.

I come from a PHP background, where pointers are not used. So when I declare a string, I don't use a pointer.

我看到在创建方法时头文件中使用了指针,但我真的不明白为什么要使用它们.

I see pointers being used in header files when creating methods, and I really don't understand why they are there for.

任何帮助将不胜感激.

推荐答案

我认为大部分讨论都是围绕该主题进行的.您可以点击这些链接

I think most of the discussion are done on this topic. you can follow these links

什么指针的障碍是什么?如何克服指针?

为什么使用指针?

http://ruel.me/blog/2010/11/22/why-use-pointers/

http://duramecho.com/ComputerInformation/WhyCPointers.html

这篇关于Objective-C和指针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆