码迷,mamicode.com
首页 >  
搜索关键字:int    ( 143001个结果
输出程序运行的时间(精确到微秒)
对于要求性能的代码,输出程序运行的时间还是很有必要的,而且需要较高的精确度,下面这个代码段就实现了此功能注意:只限于Linux下使用,因为的缘故 1 #include 2 #include 3 4 using namespace std; 5 6 int main(int argc, cha...
分类:其他好文   时间:2014-10-09 22:27:17    阅读次数:222
静态链表
#include#include#include#include#define maxsize 100using namespace std;typedef struct{ char data; int next;//游标代替指针}staticlist[maxsize];//建立静态链表...
分类:其他好文   时间:2014-10-09 22:20:07    阅读次数:169
一个简单的sel server 函数的自定义
创建自定义函数:use 数据库名gocreate function 函数名(@pno int)returns intasbegin declare @a int if not exists(select * from person where pno=@pno) set @a=-1 else set...
分类:其他好文   时间:2014-10-09 21:49:17    阅读次数:187
PHP中CURL方法curl_setopt()函数的一些参数 (转)
bool curl_setopt (int ch, string option, mixed value)curl_setopt()函数将为一个CURL会话设置选项。option参数是你想要的设置,value是这个选项给定的值。下列选项的值将被作为长整形使用(在option参数中指定):? CURL...
分类:Web程序   时间:2014-10-09 21:46:47    阅读次数:315
转类型转换
reinterpret_cast 这个转换方式在转换指针类型时比较有用 1 #include 2 3 using namespace std; 4 5 int main(void) 6 { 7 int A = 65; // 'A' 8 char * pA = reinterpr...
分类:其他好文   时间:2014-10-09 21:26:57    阅读次数:116
c++ 读取位图信息显示位图 BITMAPINFOHEADER
在C++中要将一张位图信息读取并显示在一个控件上,具体步骤如下: 1.先读取位图信息 int ReadPictureBmp(unsigned char *pBmpBuffer) { // static int i=0; // if (i>5) // { // return TRUE;  // } FILE *fp = NULL; char szFileName[...
分类:编程语言   时间:2014-10-09 20:54:07    阅读次数:525
数组元素在内存中的存储方式
代码: #include <stdio.h> #include <stdlib.h> #define L1 5 #define L2 3 // 数组元素是顺序存储的 int main(void) { int arr1[L1] = { 1, 2, 3, 4, 5, }; // 输出一维数组各个元素的地址 for (size_t...
分类:其他好文   时间:2014-10-09 20:23:28    阅读次数:160
java构造
import java.util.Scanner;public class hey {/** * @param args */ static int a,b; private static int add(int a,int b) { return a+b; } private static dou...
分类:编程语言   时间:2014-10-09 20:21:37    阅读次数:468
Hdu 3804 树链剖分 第5遍
不能原谅自己的错误。。还怀#pragma comment(linker, "/STACK:1024000000,1024000000") #include #include #include #define lson id << 1 #define rson id << 1|1 #include using namespace std; const int M = 100008; int fath...
分类:其他好文   时间:2014-10-09 20:11:27    阅读次数:127
ios中封装网络和tableview的综合运用
#import #import "ASIFormDataRequest.h" #import "Reachability.h" @protocol NetWorkDelegate; @interface JSNetWord : NSObject +(id)ShareNetwork; -(void)NetWorkWithConnctId:(int)connectid body:(NSString *)bod...
分类:移动开发   时间:2014-10-09 19:27:57    阅读次数:240
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!