c语言中的异常处理机制setjmp和longjmp

/* -------------------------------------------------------------------------** File : cexcept.c *** Coder: Spark Song. * ** Note : Use the example code from 《C Interfaces and Implementations》 * ** -------------------------------------------------------------------------*/#include <setjmp.h>#include <stdlib.h>#include <stdio.h>#include <assert....

作者: cdlda 发布时间: 11-11

1075.安全网络 ver.2

#include <cstdio> #include <cstdlib> #include <iostream> #define inf 0x3fffffff using namespace std; bool b[101]; int a[101][101]; int d[101]; int n; int dijkstra() { int i, j, s, t; for (i = 1; i <= n; i++) { d[i] = a[1][i]; b[i] = false; } b[1] = true; for (i = 2; i <= n; i++) { t = 1; s = inf; for (j = 2; j <= n; j++) { if (b[j] || d[j] > s) ...

作者: gzzcracker 发布时间: 11-11

1073.选课

#include <cstdio> #include <cstdlib> #include <iostream> #include <vector> #include <queue> using namespace std; vector<int> nt[501]; char s[501][41]; int d[501]; int a[500]; int n; void topological() { int i, u, k = 0; queue<int> que; for (i = 1; i <= n; i++) if (d[i] == 0) que.push(i); while (!que.empty()) { u = que.front(); que.pop(); a[k++] ...

作者: gzzcracker 发布时间: 11-11

prototype.js 与 jquery.js冲突的解决办法,找了..

var $j = jQuery.noConflict(); 这样就可以用 $j 来调用jQuery的$函数了,而$还是prototype的。 注意引入包的顺序是先引入Prototype,再引入jQuery。否则$会出错,因为运行jQuery之前,$ 还没初始化,而noConflict()还原的是导入jQuery之前的 $。 另外,如果你先引入jQuery,再引入Prototype的话,可以直接用$表示Prototype里面的$,而jQuery的是用jQuery。 就这个东西,捣...

作者: futieshan 发布时间: 11-11

js程序中的美元符号$

1、首先可以用来表示变量, 比如变量 var s='asdsd'或var $s='asdasd'; 2、在正则表达式中,它可以匹配结尾 /sa$/.test(string) 匹配string字符串中的sa,比如string='125sa'则匹配,string='125sa21'则不匹配 正则表达式很复杂,这里只是简单的说说。 3、由于受prototype.js(老外写的框架,用于将一些常用的函数封装,方便操作)的影响, 现在很多人都用 $来表示一个查找...

作者: 笨蛋在微笑 发布时间: 11-11

1051.Easy Job

#include <cstdio> #include <cstdlib> #include <iostream> #include <bitset> using namespace std; bitset<1000000> bs; int p[78498]; int e[78498]; int m = 0; void easy_job(int n) { int i, k = 0; int num; for (i = 0; i < 78498 && p[i] <= n; i++) { num = n; e[k] = 0; while (p[i] <= num) { e[k] += num / p[i]; num /= p[i]; } k++; } for (i = 0; i < k; i...

作者: gzzcracker 发布时间: 11-11

C++习题-编写计算体积的程序[2.6]

需要求3个长方柱的体积,请编写一个基于对象的程序。数据成员包含length(长),width(宽),height(高)。要求用成员函数实现以下功能: (1)由键盘分别输入三个长方柱的长,宽,高。 (2)计算长方柱的体积。 (3)输出三个长方柱的体积。 请编写程序,上机调试并运行。 #include <iostream> using namespace std; class Cuboid { private: int length; int width; int he...

作者: chengxiaopeng 发布时间: 11-11

C++习题-多文件程序[2.5]

将本章的例2.4改写为一个多文件的程序: 1.将类定义放在头文件arraymax.h 2.将成员函数定义放在源文件arraymax.cpp中 3.主函数放在源文件file1.cpp 请写出完整的程序,上机调试并运行。 #include <iostream> class Array_max { public: void set_value(); void max_value(); void show_value(); private : int array[10]; int max; }; #include <iostream> #include "arryma...

作者: chengxiaopeng 发布时间: 11-11

...

colinux-daemon.exe kernel=vmlinux initrd=initrd.gz mem=256 cobd0="D:/colinux/Fedora-10.img" cobd1="D:/colinux/swap.img" root=/dev/cobd0 eth0=tuntap "colinux" 00:ff:2b:1f:00:00 cofs0="D:/work/code" ro -t nt

作者: 超级忍者龟 发布时间: 11-11

C++例题-编写类输出时间[2.3]

#include <iostream> using namespace std; class Time { public: void set_time(); void show_time(); private: int hour; int minute; int sec; }; int main() { Time t1; t1.set_time(); t1.show_time(); Time t2; t2.set_time(); t2.show_time(); system("pause"); return 0; } void Time::set_time() { cin >> hour; cin >> minute; cin >> sec; } void Time::show_tim...

作者: chengxiaopeng 发布时间: 11-11