摘要:
class和struct的区别就是class需要指明private 和 public 而 struct不需要 /* 类定义 */ #include <iostream> using namespace std; struct Student { public: void eat(const stri 阅读全文
摘要:
static_cast 表示静态变量的类型转换, 如int->char, 不合适的类型转换将会发生错误 /* static_cast 类型转换 */ #include <iostream> using namespace std; int main() { int* pi = NULL; //cha 阅读全文