摘要: 1 using System; 2 3 namespace C_9_4 4 { 5 class Program 6 { 7 enum Gun {AK47=5,M4A1,M16=1,UZI,SB} 8 //类型声明应放在main函数前面 9 static void Main(string[] args 阅读全文
posted @ 2020-09-05 16:15 想活出点人样 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 3 namespace C_9_4 4 { 5 class Program 6 { 7 struct Student 8 { 9 public int xuehao; 10 public string banji; 11 public string name; 1 阅读全文
posted @ 2020-09-05 15:22 想活出点人样 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 越界 数组下标数超过承载量 例如:这样a数组就一定会超过下标限制的10的值。 1 1 int a[10]; 2 2 int i=1; 3 3 while(1) 4 4 { 5 5 a[i]=++i; 6 6 } 溢出: 就是数据超过了本来的上限,就会发生溢出 例如:这里的转化就溢出 int j=10 阅读全文
posted @ 2020-09-05 10:21 想活出点人样 阅读(407) 评论(0) 推荐(0) 编辑