基本编程笔试题

1.定义一个“数据类型”datatype,能处理字符型,整形,浮点型三种数据类型,给出构造函数。 #include"stdafx.h" #include<iostream> using namespace std; class datatype { enum { Inter, FLoat, Char }vartype; union { char c; int i; fl
相关文章
相关标签/搜索