指针q [英] pointer q

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

问题描述

我最近的一篇文章显示,指针上有足够大的失态,因为
需要返回K& R 5.1-6附录A8.6.1。所以我们有类型说明符:

int

long

..一个梦想自己变量名称:qwe,qwr,写道
< br $> b $ b int qwe;

long qwr;


并认为他知道他宣布的是什么类型。你问过我关于 的信息:


int * qwe;

long * qwr;


我会说声明的指针是 - 虽然指向不同的

类型 - 相同类型。为什么我错了? Joe

A recent post of mine showed a sufficiently large gaffe on pointers as to
need to return to K&R 5.1-6 appendix A8.6.1 . So we have type specifiers:
int
long
.. One dreams himself variable names: qwe, qwr, writes

int qwe;
long qwr;

and thinks he knows what types he''s declared. Had you asked me about:

int *qwe;
long *qwr;

I would have said the pointers declared were--while pointng to different
types--of the same type. Why am I wrong? Joe

推荐答案

" Joe Smith" < GR ********** @ netzero.net>写道:
"Joe Smith" <gr**********@netzero.net> writes:
如果你问我关于

int * qwe;
long * qwr;

我会说已经指出的指针是 - 虽然指向不同的类型 - 同一类型。为什么我错了?
Had you asked me about:

int *qwe;
long *qwr;

I would have said the pointers declared were--while pointng to different
types--of the same type. Why am I wrong?




" qwe"类型为指向int的指针。

" qwr"类型为指向长指针。

这些是不同的类型。

-

如果我告诉过你有一次,我已经告诉过你LLONG_MAX次不要夸大了夸夸其谈。

- 杰克克莱恩



"qwe" is of type "pointer to int".
"qwr" is of type "pointer to long".
Those are different types.
--
"If I''ve told you once, I''ve told you LLONG_MAX times not to
exaggerate."
--Jack Klein


乔史密斯 < GR ********** @ netzero.net>写道:
"Joe Smith" <gr**********@netzero.net> writes:
我最近的一篇文章显示,对于需要返回K& R 5.1-6附录A8.6.1的指针有足够大的失误。所以我们有类型说明符:
int
long
。一个人梦想自己变量名称:qwe,qwr,写作

int qwe;
long qwr;

并且认为他知道他宣称的类型。你有没有问我关于

int * qwe;
long * qwr;

我会说这些指针是 - - 同时指向不同的类型 - 相同类型。为什么我错了? Joe
A recent post of mine showed a sufficiently large gaffe on pointers as to
need to return to K&R 5.1-6 appendix A8.6.1 . So we have type specifiers:
int
long
. One dreams himself variable names: qwe, qwr, writes

int qwe;
long qwr;

and thinks he knows what types he''s declared. Had you asked me about:

int *qwe;
long *qwr;

I would have said the pointers declared were--while pointng to different
types--of the same type. Why am I wrong? Joe




int *和long *是两种不同的类型(两种指针类型)。


我很好奇,是什么导致你认为他们是同一类型的?


-

Keith Thompson(The_Other_Keith) ks *** @ mib.org < http://www.ghoti.net/~kst>

圣地亚哥超级计算机中心< * > < http://users.sdsc.edu/~kst>

我们必须做点什么。这是事情。因此,我们必须这样做。



int* and long* are two different types (both pointer types).

I''m curious, what led you to think that they''re the same type?

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.




" Keith Thompson" < KS *** @ mib.org>在消息中写道

news:ln ************ @ nuthaus.mib.org ...

"Keith Thompson" <ks***@mib.org> wrote in message
news:ln************@nuthaus.mib.org...
" Joe Smith" < GR ********** @ netzero.net>写道:
"Joe Smith" <gr**********@netzero.net> writes:
我最近的一篇文章显示,对于需要返回K& R 5.1-6附录A8.6.1的指针有足够大的失误。所以我们有类型
说明符:
int

。一个人梦想自己变量名称:qwe,qwr,写作

int qwe;
long qwr;

并且认为他知道他宣称的类型。你有没有问我关于

int * qwe;
long * qwr;

我会说这些指针是 - - 同时指向不同的类型 - 相同类型。为什么我错了? Joe
A recent post of mine showed a sufficiently large gaffe on pointers as to
need to return to K&R 5.1-6 appendix A8.6.1 . So we have type
specifiers:
int
long
. One dreams himself variable names: qwe, qwr, writes

int qwe;
long qwr;

and thinks he knows what types he''s declared. Had you asked me about:

int *qwe;
long *qwr;

I would have said the pointers declared were--while pointng to different
types--of the same type. Why am I wrong? Joe



int *和long *是两种不同的类型(两种指针类型)。

我很好奇,是什么导致你认为他们' '是相同的类型?



int* and long* are two different types (both pointer types).

I''m curious, what led you to think that they''re the same type?




什么阻止我交换int *和long *?乔



What''s to stop me from swapping an int * and a long *? Joe


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

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