⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpp06.cpp

📁 C++参考书
💻 CPP
字号:

// Coded by plusir -- Jan.14.2003.
// Standard C++ Bible -- (P749-27-6)

#include <iostream>
#include <typeinfo>
using namespace std ;

class Control { } ;

int main()
{
	Control ct ;
	cout << "ct is a " << typeid( ct ).name() << endl ;

	double counter = 1.23 ;

	if ( typeid( counter ) != typeid( Control ) )
		cout << "counter is not a " << typeid( Control ).name() << endl ;

	if ( typeid( counter ) == typeid( 1.23 ) )
		cout << "counter is double" << endl ;

	if ( typeid( counter ) != typeid( int ) )
		cout << "counter is not an integer value" << endl ;

	return 0 ;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -