摘要:
结构 在oc中只能声明变量 不能声明函数和类结构声明struct DateT {int month;int day;int year;};结构可以在起最后的分号之后定义结构变量,并且可以格式化structDateT {intmonth;intday;intyear;}today{1,2,3};结构可以不定义名字 ,但是要先声明变量struct {intmonth;intday;intyear;}today{1,2,3};结构可以嵌套structDateT {intmonth;intday;intyear;};struct Time {int hoursint seconds;int min;} 阅读全文