2018年11月19日
摘要: 自定义错误类型 自行错误抛出 函数中的变长参数 不定长形参的应用 错误处理 五、python所有的标准异常类: 阅读全文
posted @ 2018-11-19 17:00 likeghee 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 结构体的定义 数组变量的定义 结构体数组的使用 阅读全文
posted @ 2018-11-19 16:31 likeghee 阅读(5456) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; struct student{ // 创建构造体 int num; char name[20]; ....; }; int main(){ student.stud; char filename[40]; fstream infile; // (... 阅读全文
posted @ 2018-11-19 16:20 likeghee 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 注意在给 char name[10] 赋值时 不能 stud.name = "xxx" ,不能把字符串赋给地址 给char name[10]赋值可以 如上代码所示 也可以 cin>>stud.name; 或者 cin.getline ( stud.name , 80) ; 阅读全文
posted @ 2018-11-19 16:05 likeghee 阅读(791) 评论(0) 推荐(0) 编辑