类型转换函数能够实现把一个类 类型 转换成
基本数据类型(int、float、double、char等) 或者 另一个类
类型。其定义形式如下,注意不能有返回值,不能有参数,只能返回要转换的数据类型。class X{public: operator TYPE() { //...
分类:
编程语言 时间:
2014-05-12 12:23:59
阅读次数:
329
已知在Java中,boolean、byte、short、int、long、char、float、double这八种是基本数据类型,其余的都是引用类型,比如String、数组、接口、对象等。
当我们声明一个引用类型变量时,系统只为该变量分配了引用空间,并未创建一个具体的对象; 当用new为对象...
分类:
其他好文 时间:
2014-05-12 11:58:21
阅读次数:
342
32位平台char 1个字节8位short 2个字节16位int 4个字节32位long
4个字节long long 8个字节指针 4个字节64位平台char 1个字节short 2个字节int 4个字节long 8个字节long long
8个字节指针 8个字节范围char -128 ~ +127...
分类:
其他好文 时间:
2014-05-10 07:18:37
阅读次数:
217
1 #include 2 #include 3 using namespace std; 4
int nCases; 5 int m[1001], n[1001]; 6 char a[1001], b[1001]; 7 int main() 8 { 9
scanf("%d", &nCa...
分类:
其他好文 时间:
2014-05-10 05:14:19
阅读次数:
342
关
组件:"Adodb.Stream"
有下列方法:
Cancel 方法
使用方法如下
Object.Cancel
说明:取消执行挂起的异步 Execute 或 Open 方法的调用。
Close 方法
使用方法如下
Object.Close
:关闭对像
CopyTo 方法
使用方法如下
Object.CopyTo(destStream,[Char...
分类:
数据库 时间:
2014-05-10 04:49:52
阅读次数:
370
主程序代码 - 1 #include 2 #include 3 main() 4 { 5
long t1; 6 int i, n, t, t3; 7 char a[100]; 8 printf("please input a number
string:\n");...
分类:
其他好文 时间:
2014-05-10 03:10:56
阅读次数:
269
1. fopen函数1 #include 2 FILE *fopen(const char
*path, const char *mode) 返回:文件顺利打开后,指向该流的文件就会被返回。如何文件打开失败则返回NULL,并把错误代码存在 errno
中。参数说明: mode: 1)r 以只读方式....
分类:
其他好文 时间:
2014-05-10 03:00:13
阅读次数:
290
KMP 总结1.strstr函数|函数名: strstr|功 能:
在串中查找指定字符串的第一次出现 |用 法: char *strstr(char *str1, char
*str2);|据说strstr和KMP的算法效率差不多|注意:返回的是该字符串第一次出现时的指针,所以如果要计算下标,可以用...
分类:
其他好文 时间:
2014-05-10 02:59:16
阅读次数:
409
#includeusing namespace std;const int maxn =
30000+100;int F[maxn], D[maxn], S[maxn];void set(int n){ for(int i =0 ;i
>P; char c; int a, b; while(P--)...
分类:
其他好文 时间:
2014-05-10 02:56:28
阅读次数:
313
1. C99标准规定了如下关键字:auto _Bool break case char
_Complexconst continue default restrict do ...
分类:
编程语言 时间:
2014-05-10 02:27:27
阅读次数:
422