2013-04-07

1。int i=1,j=2; cout<<i+++j<<endl;   结果为3.

2.设有如下 class 定义:

#include <iostream>
using namespace std;
class CA
	{
		public:
			virtual void foo(int i)	
				{ cout << "void CA::foo(int i)" << endl; }
	};
	class CB : public CA
	{
		public:
			virtual void foo(int i)	
				{ cout << "void CB::foo(int i)" << endl; }

			virtual void foo(double d)	
				{ cout << "void CB::foo(double d)" << endl;	}
	};
void main(void)
{
	CB b;
	CA & a = b;

	a.foo(5.0);
	b.foo(5.0);
}
输出结果为void CB::foo(int i)     void CB::foo(double d),注意仔细体会其中的含义。

3.for循环语句中,for ( int i=0,j=5;i=j;)形式正确,但是for ( int i=0,j=5;i=j);不正确,因为for循环括号中必须有两个分号。

4.void fun(int){} double b=2.7; fun(b);正确  但是void fun(int *){}   bouble b=2.7; fun(&b):不正确

5.int fun4( int ); int(*pf)(int) = fun4; 调用时为 cout<<(*pf)( 256 );莫写为cout << *pf( 256 );

6.int n=5; int a[n];不正确,应该为const int n=5才行。

7.用转换构造函数可以将一个指定类型的数据转换为类的对象。

8.在C++中,构造函数,拷贝构造函数,析构函数,赋值函数,友元函数都不可被派生类继承。

9.若要实现多态联编,必须用基类指针调用虚函数。

10.含有纯虚函数的类称为抽象类。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
我的电脑显卡是NVIDIA CUDA 11.6.114 driver,win10,64位的,在安装Anaconda时,有如下几个版本:Anaconda-1.4.0-Windows-x86_64.exe 241.4 MiB 2013-07-04 17:58 Anaconda-1.5.0-Linux-x86.sh 238.8 MiB 2013-07-04 18:10 Anaconda-1.5.0-Linux-x86_64.sh 306.7 MiB 2013-07-04 18:22 Anaconda-1.5.0-MacOSX-x86_64.sh 166.2 MiB 2013-07-04 18:37 Anaconda-1.5.0-Windows-x86.exe 236.0 MiB 2013-07-04 18:45 Anaconda-1.5.0-Windows-x86_64.exe 280.4 MiB 2013-07-04 18:57 Anaconda-1.5.1-MacOSX-x86_64.sh 166.2 MiB 2013-07-04 19:11 Anaconda-1.6.0-Linux-x86.sh 241.6 MiB 2013-07-04 19:19 Anaconda-1.6.0-Linux-x86_64.sh 309.5 MiB 2013-07-04 19:32 Anaconda-1.6.0-MacOSX-x86_64.sh 169.0 MiB 2013-07-04 19:47 Anaconda-1.6.0-Windows-x86.exe 244.9 MiB 2013-07-04 19:56 Anaconda-1.6.0-Windows-x86_64.exe 290.4 MiB 2013-07-04 20:09 Anaconda-1.6.1-Linux-x86.sh 247.1 MiB 2013-07-05 08:34 Anaconda-1.6.1-Linux-x86_64.sh 317.6 MiB 2013-07-05 09:20 Anaconda-1.6.1-MacOSX-x86_64.pkg 197.3 MiB 2013-07-05 10:05 Anaconda-1.6.1-MacOSX-x86_64.sh 170.0 MiB 2013-07-05 12:20 Anaconda-1.6.1-Windows-x86.exe 244.4 MiB 2013-07-05 12:29 Anaconda-1.6.1-Windows-x86_64.exe 289.9 MiB 2013-07-05 12:49 Anaconda-1.6.2-Windows-x86.exe 244.4 MiB 2013-07-10 06:19 Anaconda-1.6.2-Windows-x86_64.exe 289.9 MiB 2013-07-10 07:04 Anaconda-1.7.0-Linux-x86.sh 381.0 MiB 2013-09-20 01:04 Anaconda-1.7.0-Linux-x86_64.sh 452.6 MiB 2013-09-20 02:49 Anaconda-1.7.0-MacOSX-x86_64.pkg 256.7 MiB 2013-09-20 05:04 Anaconda-1.7.0-MacOSX-x86_64.sh 223.3 MiB 2013-09-20 11:00 Anaconda-1.7.0-Windows-x86.exe 280.6 MiB 2013-09-20 11:11 Anaconda-1.7.0-Windows-x86_64.exe,请问我应该安装哪一个?
07-24

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值