tc++中当我去掉类型转换时,为何报int*不能赋给time*指针的error呢
tc++中:(已有相关头文件)
1 struct time tm,*tr;
2 tr=(struct time*) new time;
为什么第二句就是编译不过呢?并提示缺少 ;
而且当我去掉2中的类型转换时,也报int*不能赋给time*指针,但按tc++语法的话,应该是不报错的啊!!
请指教:
有朋友说要写成new struct time
而当我写成 new struct time的时候,它反而提示time 没定义!
无语了~~
另外tc++中,必须写成struct "name"吗 ?