单项选择题
已知在函数func()中语句this->ff=0;与语句ff=0;的效果完全相同。对于这一现象,下列表述中错误的是( )。
A.ff是某个类的数据成员,func()是该类的友元函数
B.ff是某个类的数据成员,func()是该类的成员函数
C.this->ff和ff是同一个变量
D.func不是一个静态成员函数
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
有如下程序: #include <iostream> using namespace std; class Base public: Base(int x=0) cout<<x; ; class Derived: public Base public: Derived(int x=0) cout<<x; private: Base val; ; int main() Derived d(1); return 0; 程序的输出结果是( )。
A.0
B.1
C.01
D.001
点击查看答案
单项选择题
下面程序的输出是( )。 #defineN 3 #define M(n)((N+1)*n) #include <iostream.h> void main() int z=2*(N+M(5+1)); cout<<z<<endl;
A.42
B.48
C.54
D.编译报错
点击查看答案
相关试题
有如下程序: #include <iostream> ...
在进行任何C++流的操作后,都可以用C++...
对定义重载函数的下列要求中,( )是错误的。
以下程序的执行结果是( )。 #include...
有以下程序 #include <iostream.h> ...