catch子句throw;catch(...)noexcept跟在函数参数列表后,也可以作为运算符,与异常说明的bool实参一起出现while (cin >> item1 >> item2) {
try{
if (item1.isbn() != item2.isbn())
throw (runtime_error("Data must refer to same ISBN");
} catch (runtime_error err) {
cout << err.what()
<< "\nTry Again? Enter Y or N" << endl;
}
}
namespace命名空间结束后无需分号::member_namenamespace primer = cplusplus_primer;using一次只引入命名空间的一个成员public和virtual的顺序随意new (place_address) type [size] { braced initializer list}typeiddynamic_casttype_info定义在<typeinfo>头文件中
t1==t2、t1!=t2、t.name()enum color {red, yellow, green},之后再定义这三者会报错enum class peppers {red, yellow, green}enum intValues : unsigned long long定义类型volatile
extern "C"调用其他语言编写的函数