码迷,mamicode.com
首页 >  
搜索关键字:sizeof    ( 5917个结果
喜羊羊系列之【标准IO】
博客地址:http://blog.csdn.net/muyang_ren 1、文件按字符复制 /************************************************************************* > File Name: 1_size.c > Author: 梁惠涌 > Addr: > Created Time: 2015年04月12日...
分类:其他好文   时间:2015-04-16 19:54:35    阅读次数:150
下面调用函数f 处理外部RAM中的数
Ptr=NULL; //NULL在文件stdio.h中定义过。 Ptr=(unsigned int *)malloc(N*sizeof(int)); //注意一定是要开辟N个int型的字节长度,不然编译会出错。 //printf("%ld\n",Ptr); for(i=0;i { *(Pt...
分类:其他好文   时间:2015-04-16 01:30:25    阅读次数:262
Python 文件的IO
对文件的操作#coding=utf-8#!user/bin/pythonimport os#基本操作和写入文件fo = open("test2.py",'wb')print fo.nameprint fo.__sizeof__();print fo.modefo.write("print 20")f...
分类:编程语言   时间:2015-04-15 18:51:42    阅读次数:114
字典树【模板】
struct TrieNode { int Count; struct TrieNode* Next[26]; }Tree,*Trie; TrieNode *root; void Create() //初始化 { root = new TrieNode; memset(root->Next,NULL,sizeof(root->Next)); root-...
分类:其他好文   时间:2015-04-15 11:26:35    阅读次数:131
用联合确定计算机的字节顺序
#include union { long Long; char Char[sizeof(long)]; } u; int main(void) { u.Long = 1; if (u.Char[0] == 1) { printf("Addressing is right-to-left\n"); } else if (u.Ch...
分类:其他好文   时间:2015-04-14 10:01:37    阅读次数:139
Codeforces 385C Bear and Prime Numbers [素数筛法]
Code: #include #include #include #include #include #include #include #include #include #include #include #include #define INF 0x7fffffff #define SUP 0x80000000 #define mem(a,b) memset(a,b,sizeof(a)...
分类:其他好文   时间:2015-04-14 00:44:46    阅读次数:160
2的幂位数大整数分治算法
#include #include #include #include using namespace std; //500 wei cheng fa struct Num{ int num[1000],len; Num(){ memset(num,0,sizeof(num)); len=1; } Num(const str...
分类:编程语言   时间:2015-04-13 23:07:27    阅读次数:397
poj 1426
题意 : 给定一个n求只包括0与1的数 能被n整除 任意一个答案就可以#include#include#include#include using namespace std; #define CLR(arr,val) memset(arr,val,sizeof(arr)) typedef lo.....
分类:其他好文   时间:2015-04-13 22:27:09    阅读次数:127
C++类所占内存大小计算
C++类所占内存大小计算说明:笔者的操作系统是32位的。class A {}; sizeof( A ) = ? sizeof( A ) = 1明明是空类,为什么编译器说它是1呢? 空类同样可以实例化,每个实例在内存中都有一个独一无二的地址,为了达到这个目的,编译器往往会给一个空类隐含的加一个字节,....
分类:编程语言   时间:2015-04-13 22:24:44    阅读次数:199
strcpy and memcpy
1. Inconsist length.char a3[2];char *a = "Itis "strcpy(a3, a); It is wrong. a3 will be correct, but a is missing. memcpy(a3, a, sizeof(char)* 2); It w...
分类:其他好文   时间:2015-04-12 13:13:36    阅读次数:220
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!