C指针:什么是STRUC * A,*结构A和结构* A之间的区别? [英] C pointers: what's the difference between struc* A, struct *A and struct * A?

查看:170
本文介绍了C指针:什么是STRUC * A,*结构A和结构* A之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一些研究,以更好地理解C指针,但我有一个很难了解这些:
是'结构* A'结构上的指针?
那么什么是'结构* A'?
我也看到有人写'INT常量*了,这是什么意思?


解决方案

  

什么是 STRUC * A 结构* A 结构* A之间的差异


他们当量(LY错误的)。 C是一种形式自由的语言,空白并不重要。


  

结构* A 结构上的指针?


没有,这是(仍然)语法错误(结构是保留关键字)​​。如果你在那里替代一个有效的结构名,那么这将是一个,肯定的。


  

INT常量* A ,这是什么意思?


本声明 A 是一个指向 const int的

I'm doing some researches to better understand pointers in C, but I'm having a hard time understanding these: Is 'struct* A' a pointer on a structure? Then what is 'struct *A'? And I've seen someone writing 'int const * a', what does this mean?

解决方案

what's the difference between struc* A, struct *A and struct * A?

They're equivalent(ly wrong). C is a free-form language, whitespace doesn't matter.

Is struct* A a pointer on a structure?

No, it's (still) a syntax error (struct is a reserved keyword). If you substitute a valid structure name in there, then it will be one, yes.

int const * a, what does this mean?

This declares a to be a pointer to const int.

这篇关于C指针:什么是STRUC * A,*结构A和结构* A之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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