typedef 写了两次解决思路
typedef 写了两次#includeiostream#includeiomanipusing namespace std#define OK 1#define ERROR 0t
typedef 写了两次
#include<iostream>
#include<iomanip>
using namespace std;
#define OK 1
#define ERROR 0
typedef int Status;
typedef int ElemType;
为什么typedef可以写两次
[解决办法]typedef是给类型取个别名,它允许有多个别名。
typedef int Status;
typedef int ElemType;
之后,
Status i 或者 ElemType i都等同于 int i
[解决办法]Status和ElemType都是int的代名词呗
[解决办法]typedef?是定义类型别名,应该是可以定义多个的吧