码迷,mamicode.com
首页 >  
搜索关键字:sizeof    ( 5917个结果
HDU 2821Pusher(DFS )
题意:是一个游戏,可以玩下,就很清楚了,给你有箱子的图,你现在选择一个初始位置,并确定推的方向序列,规则:你要和箱子至少有一个空格才可以推,每次是先拿掉一个箱子,再把剩余的箱子(如果还存在的话)推向下一格,选择一个方向后要一直沿着这个方向走到不能走为止。#include #define cl(a,b) memset(a,b,sizeof(a)); #define LL...
分类:其他好文   时间:2015-08-02 10:18:25    阅读次数:155
C++ new(1)
如果找工作的同学看一些面试的书,我相信都会遇到这样的题:sizeof 不是函数,然后举出一堆的理由来证明 sizeof 不是函数。在这里,和 sizeof 类似,new 和 delete 也不是函数,它们都是 C++ 定义的关键字,通过特定的语法可以组成表达式。和 sizeof 不同的是,sizeo...
分类:编程语言   时间:2015-08-02 10:10:27    阅读次数:176
C语言结构体-struct
知识点:1)结构体的定义。2)结构体的sizeof。3) 结构体的指针。1) 结构体的定义:在逻辑上有一定关联的多个数据类型做为一整体进行操作的数据结构,它的关键字是struct。下面我将定义一个结构体struct Student{ char *name; int age; int sid;}...
分类:编程语言   时间:2015-08-02 06:20:59    阅读次数:168
arm-linux-androideabi-gcc 预定义宏(编译器版本4.8)
打印方法: touch test.c arm-linux-androideabi-gcc -E -dM -c test.c >> marco_arm.txt #define __DBL_MIN_EXP__ (-1021) #define __HQ_FBIT__ 15 #define __UINT_LEAST16_MAX__ 65535 #define __ARM_SIZEOF_WCHAR_T...
分类:移动开发   时间:2015-07-31 22:02:39    阅读次数:459
c语言mysql数据库事务开始、提交、回滚范例
1、 事务提交模式修改:修改数据库提交模式为0[手动提交] memset ( sql, 0x00, sizeof( sql ) ); memcpy ( sql, "set autocommit=0;", 17 ); if( mysql_query( sock, sql ) ){ sprintf( g_acTrcMsg, "关闭自动提交模式失败[%d][%s]", mysql_errno( ...
分类:数据库   时间:2015-07-31 16:26:47    阅读次数:207
统计难题---hdu1251字典树模板
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1251node *head=(node*)malloc(sizeof(node));for(int i=0; inext[i] = NULL; head->sum = 0;}可以改成node *hea.....
分类:其他好文   时间:2015-07-31 10:13:26    阅读次数:117
HDU 2604 Queuing
#include#includeusing namespace std;int m;int f(int x){ int s1[5][5],s2[5][5],s3[5][5],i,a=0,j,k,b=0,c=0,d=0; memset(s1,0,sizeof(s1)); memset...
分类:其他好文   时间:2015-07-30 20:47:20    阅读次数:98
排序汇总
//排序汇总 #include #include #define arr_len(array) (sizeof(array) / sizeof(array[0])) clock_t start_time, end_time;void swap(int *arr, int i, int j){ int temp = arr[i]; arr[i] =...
分类:编程语言   时间:2015-07-30 19:30:45    阅读次数:115
D的小 L
?? /*全排列的简单举例*/ #include #include #include #include using namespace std; int main() {  int t;  scanf("%d",&t);  while(t--)  {   int n;   int a[100];   memset(a,0,sizeof(a));   scanf("%...
分类:其他好文   时间:2015-07-30 17:09:39    阅读次数:100
翻转字符串
char *p,*start,*end,*temp,c; int count = 0,i =0 ; p = (char *)malloc(21 * sizeof(char)); printf("请输入要反转的字符串:\n"); while ((c = getchar() )!= '\n') ...
分类:其他好文   时间:2015-07-30 16:46:13    阅读次数:108
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!