c++是不能了,你要是用c#是可以的
#include#includeusing namespace std;typedef string Elem;#define OK 1;#define ERROR -1;typedef struct{ Elem TrainNo; Elem TrainStart; Elem TrainEnd; Elem StartTime; Elem ReachTime; float Price;