上一页 1 ··· 5 6 7 8 9
摘要: 使用throw抛出异常 throw总是出现在函数体中,用来抛出一个Throwable类型的异常。程序会在throw语句后立即终止,它后面的语句执行不到,然后在包含它的所有try块中(可能在上层调用函数中)从里向外寻找含有与其匹配的catch子句的try块。 列如:(1)throw new excep 阅读全文
posted @ 2019-07-01 12:35 WhyNott 阅读(809) 评论(0) 推荐(0) 编辑
摘要: 1 #include> 2 #include 3 using namespace std; 4 class Bank; 5 void menu(Bank &); 6 7 class Account{ 8 private: 9 string name; 10 string ID; 11 double ... 阅读全文
posted @ 2018-07-23 18:28 WhyNott 阅读(3028) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> bool IsPrime(int val) //这是一个函数的限制性下面main的部分然后在回来{ int i; for (i = 2; i < val; ++i) { if (val%i ==0) break; } if (i ==val) return tru 阅读全文
posted @ 2018-05-09 12:40 WhyNott 阅读(142) 评论(0) 推荐(0) 编辑
摘要: /*2018年2月10日23:25:52这是冒泡排序 i< len-1 因为len=6 所以需要比较五次 j <len-1-i 随着i的增大 后者梁和数字之间需要比较的次数越来越少 从开始的五个数字 到最后的前两个数字*/ # include <stdio.h> void sort(int *a,i 阅读全文
posted @ 2018-05-09 12:38 WhyNott 阅读(67) 评论(0) 推荐(0) 编辑
摘要: # include <stdio.h> # include <malloc.h># include <stdlib.h> typedef struct Node{ int data; //数据域 struct Node *pNext;//指针域 } NODE, *PNODE; //NODE 等价于 阅读全文
posted @ 2018-05-09 12:35 WhyNott 阅读(90) 评论(0) 推荐(0) 编辑
摘要: # include<stdio.h># include <malloc.h># include <stdlib.h> // 包含了exit函数 //定义了数据类型名字叫做 struct Arrstruct Arr{ int * pBase; //存储的数组第一个元素的地址 int len; //数组 阅读全文
posted @ 2018-05-09 12:33 WhyNott 阅读(418) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9