char c =''c''; ''c''== *& c; / *好的* / ''c''==& * c; / *错误* / IOW,如果你想到*和&作为运营商在 适当的空间,然后& *和*&是等价的。 然而,在一个实际的实现中,它不是这样的,因为实际的域/ codomains不匹配,所以 。 将*视为所有 类型指针对象空间的运算符,&作为运营商 所有对象的空间。很明显,如果c不是指针,* c 是未定义的,所以只要c是一个对象,就会定义*& c , 但是& * c仅在c为对象时定义 类型指针。 In an academic sense, that may be true, but you need to be careful.Consider: char c = ''c'';''c'' == *&c; /* okay */''c'' == &*c; /* error */ IOW, if you think of * and & as operators on theappropriate space, then &* and *& are equivalent.However, in an actual implementation, it aint so,since the actual domains/codomains don''t match. Think of * as an operator on the space of allobjects of type pointer, and & as an operatoron the space of all objects. Clearly, *cis undefined if c is not a pointer, so *&cwill be defined as long as c is an object,but &*c is only defined if c is an objectof type pointer. 这篇关于请在“关于指针操作的注释”中查看我的网页内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-28 10:47