C++ Q16: dereferencing
生活随笔
收集整理的這篇文章主要介紹了
C++ Q16: dereferencing
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
發(fā)信人: careerchange (Stupid), 信區(qū): Programming
標(biāo)? 題: C++ Q16: dereferencing
發(fā)信站: BBS 未名空間站 (Mon Aug? 9 22:49:44 2010, 美東)
struct X {
? int foo() { return 0; }
} x;
struct Y {? static int (X::*p)(); };
int (X::*Y::p)()=&X::foo;
Given the declarations in the sample code above, which one of the following
invocations is correct?
a) (x.*Y::p)();
b) (x->*Y::p)();
c) (Y::p)(x);
d) (Y::x.*p)();
e) (x.Y::p)();?
標(biāo)? 題: C++ Q16: dereferencing
發(fā)信站: BBS 未名空間站 (Mon Aug? 9 22:49:44 2010, 美東)
struct X {
? int foo() { return 0; }
} x;
struct Y {? static int (X::*p)(); };
int (X::*Y::p)()=&X::foo;
Given the declarations in the sample code above, which one of the following
invocations is correct?
a) (x.*Y::p)();
b) (x->*Y::p)();
c) (Y::p)(x);
d) (Y::x.*p)();
e) (x.Y::p)();?
轉(zhuǎn)載于:https://www.cnblogs.com/cutepig/archive/2010/08/11/1797619.html
與50位技術(shù)專家面對(duì)面20年技術(shù)見證,附贈(zèng)技術(shù)全景圖總結(jié)
以上是生活随笔為你收集整理的C++ Q16: dereferencing的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C#开发XML WebService接口
- 下一篇: s3c2440移植MQTT