摘要:
C语言传统的类型转换 C方式的类型转换方式:(Type) (Expression)或Type (Expression),后者比较古老。C风格的强制类型转换容易出问题,比较粗暴,如: typedef void(PF)(int); struct Point { int x; int y; }; int 阅读全文
摘要:
共用体数据类型错误 问题描述 在编写Union共用体类型的时候,写了如下代码,在第5行出现错误: #include <iostream> #include <string> using namespace std; int main() { union { string nu, na; int ag 阅读全文