桑海

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年4月3日

摘要: 第一次没仔细审题:View Code 1 #include<iostream> 2 #include<sstream> 3 #include<string> 4 #include<vector> 5 using namespace std; 6 7 class stu 8 { 9 public: 10 int sol; 11 string time; 12 int h, m, s;//对应的时分秒 13 int score;//得分 14 bool sm;//标志是否是最小的那个(默认是) 15 stu() 16 {... 阅读全文
posted @ 2013-04-03 21:10 桑海 阅读(253) 评论(0) 推荐(0) 编辑

摘要: runtimeerror(运行时错误)就是程序运行到一半,程序就崩溃了。比如说:①除以零②数组越界:inta[3];a[10000000]=10;③指针越界:int*p;p=(int*)malloc(5*sizeof(int));*(p+1000000)=10;④使用已经释放的空间:int*p;p=(int*)malloc(5*sizeof(int));free(p);*p=10;⑤数组开得太大,超出了栈的范围,造成栈溢出:inta[100000000];如果你用的是WindowsXP操作系统,那么RuntimeError的界面一般如下: 阅读全文
posted @ 2013-04-03 20:36 桑海 阅读(319) 评论(0) 推荐(0) 编辑