- 浏览: 441192 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (538)
- C/C++ Primer (69)
- Objective-C Primer (102)
- Python Primer (19)
- JavaScript Primer (1)
- Java Primer (37)
- PHP Primer (17)
- 泛 Linux (37)
- Shell Script (21)
- APUE (21)
- UNP__1&2 (19)
- NetWork (7)
- Oracle周边 (38)
- Mysql里边 (6)
- Windows技 (9)
- 简单算法 & 数据结构 (14)
- 设计模式 (6)
- GTK历程 (12)
- 工具使用 (25)
- 杂事 (23)
- 一些概念 (17)
- Web方面 (10)
- myCodeTools (9)
- ^未 竟$ (13)
- 硬件通信 (2)
- Games (1)
最新评论
#include <stdio.h> #include <string.h> int main(int argc, char *argv[]) { int num = 1024; char a[sizeof(int)] = {0}; memcpy(a, &num, sizeof(num)); int i = 0; for (; i < sizeof(num); ++i) { printf("a[%d]=%d \n", i, a[i]); } int k = 0; memcpy(&k, a, sizeof(int)); printf("k = %d", k); return 0; }
发表评论
-
float equal
2013-05-23 18:21 781- (BOOL)floatA:(float)f1 equalB ... -
C++序列化
2012-07-12 09:51 540http://hi.baidu.com/ewook/item/ ... -
C++著名内裤
2011-12-02 14:00 7711、C++各大有名库的介绍 ... -
C++写C
2011-09-06 17:23 591在C++中写C,标准头文件写法 #ifndef __AB ... -
errno.h
2011-05-05 14:27 653#define EPERM 1 ... -
__cplusplus
2011-04-21 15:09 706http://www.cnblogs.com/stonecra ... -
Pthread__常用
2011-04-21 11:46 811http://blogold.chinaunix.net/u/ ... -
常用预编译
2011-04-21 10:32 614#if defined(WIN32) || defined ... -
C++__容器
2011-04-18 10:16 525http://apps.hi.baidu.com/share/ ... -
C++模板
2011-03-29 14:27 596内容主要来至《钱能C++程序设计教程》&《C++ Pr ... -
交叉引用、前置声明
2011-03-02 09:40 772有两个类相互引用了,编译器报错。 原因是两个类交叉引用: A ... -
typedef的四个用途和两个陷阱
2010-12-14 12:34 613http://hi.baidu.com/changfeng01 ... -
第五届开源小组招新题目
2010-12-03 21:56 706这是学校的开源小组招新题。 08年时我是第二届的组长,不知不觉 ... -
string const char*
2010-12-02 16:13 737http://topic.csdn.net/u/2008092 ... -
CPP Container
2010-11-10 09:20 651延后整理。。。 -
C语言运算符优先级
2010-11-02 17:45 747优先级 运算符 ... -
point point
2010-11-02 17:23 583http://learn.akae.cn/media/ch23 ... -
位运算
2010-11-01 11:33 751千百年来,位运算始终没出现在我写的代码里,今天终于出现了。 ... -
Unix环境下操作特大文件
2010-11-01 11:03 572http://hi.baidu.com/jiangfeng11 ... -
GCC在C语言中内嵌汇编
2010-10-22 14:48 1332http://hi.baidu.com/liu_bin0101 ...
相关推荐
1.7 itoa函数和atoi函数 1.8 strcmp函数实现 1.9 strcpy函数实现 1.10 memcpy函数实现 1.11 memcpy和memmove函数的实现 1.12 strcat函数实现 1.13 使用库函数atoi,将char *→int 1.14 使用库函数itoa,将int→...
自己对源代码做的一些整理,包括:atoi itoa strcpy strcat strlen memcpy memset等等常用的字符串处理函数,提供源代码实现。
-> line 42: int itoa(int i, char* str) algorithm error: itoa fails when i is -32768 再如,当出现了参数传递错误时,编译程序可以给出如下的错误信息: -> line 318: strCopy = memcpy(malloc(length), str,...
memcpy memicmp memmove memset movmem setmem stpcpy strcat strchr strcmp strcmpi strcpy strcspn strdup stricmp strlen strlwr strncat strncmp strncmpi strncpy strnicmp strpbrk ...
memcpy memicmp memmove memset movmem setmem stpcpy strcat strchr strcmp strcmpi strcpy strcspn strdup stricmp strlen strlwr strncat strncmp strncmpi strncpy strnicmp strpbrk ...
memcpy memicmp memmove memset movmem setmem stpcpy strcat strchr strcmp strcmpi strcpy strcspn strdup stricmp strlen strlwr strncat strncmp strncmpi strncpy strnicmp strpbrk ...
memcpy memicmp memmove memset movmem setmem stpcpy strcat strchr strcmp strcmpi strcpy strcspn strdup stricmp strlen strlwr strncat strncmp strncmpi strncpy strnicmp strpbrk ...
memcpy memicmp memmove memset movmem setmem stpcpy strcat strchr strcmp strcmpi strcpy strcspn strdup stricmp strlen strlwr strncat strncmp strncmpi strncpy strnicmp strpbrk ...
* 常见的字符串函数实现: * strlen * strcpy strncpy * strcmp strncmp * strcat strncat * strstr * * 内存操作: * memset、memcmp、memcpy、memmove * * 字符串和数组转换: * atoi itoa *
w_crt A hobby c runtime library on linux system(x86). ... string opeartions(printf, itoa, strlen, strcpy, strcat, strncat, strchr, strrchr, strcmp, strncmp, memcpy, memset).
ft生成文件 生成文件库 Makefile测试功能:libc函数: ft_memset ft_bzero ft_memcpy ft_memccpy ft_memmove ft_memchr ft_memcmp ft_strlen ft_isalpha ft_isdigit ft_isalnum ft_isascii ft_isprint ft_toupper ft...
char *itoa_private(int val, char *buf, unsigned radix);//整数转字符串 int my_isdigit(int ch);//判断字符是否为数字 long long StrToInt(const char *s,int sign);//字符串转数字 int atoi_32(const char *s);/...
第1章 声明和初始化 基本类型 1.1 我该如何决定使用哪种整数类型? 1.2 为什么不精确定义标准类型的大小? 1.3 因为C语言没有精确定义类型的大小,所以我一般都用typedef定义int16和int32。...
内容简介 《你必须知道的495个C语言问题》以问答的形式组织内容,讨论了学习或使用C语言的过程中经常遇到的一些问题。书中列出了C用户经常问的400多个经典问题,涵盖了初始化、数组、指针、字符串、内存分配、库函数...
previous up contents next C 语言常见问题集 原著:Steve Summit 翻译:朱群英, 孙 云 修订版 0.9.4, 2005年6月23日 版权所有 © 2005 ... * 1.... * 2.... * 3.... o 3.10 我的编译器在结构中留下了空洞, 这导致空间浪费...
老资源。 目录 1 声明和初始化1 1.1 我如何决定使用那种整数类型? . . . .... .... .... .... .... .... ........ .... ................ ....2.1 声明struct x1 f .... 和typedef struct f .... ....2.2 为什么struct x f .... .... .... .... .... .... .... .... .... .... .... ....