Chinaunix首页 | 论坛 | 博客
  • 博客访问: 491961
  • 博文数量: 51
  • 博客积分: 257
  • 博客等级: 二等列兵
  • 技术积分: 1489
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-02 18:30
个人简介

Unix/Linux, mysql, web,企业应用

文章分类

全部博文(51)

文章存档

2015年(1)

2014年(1)

2013年(48)

2012年(1)

我的朋友

发布时间:2013-03-28 22:46:46

先上代码再解释:#include <stdio.h>#include <fcntl.h>#include <sys/types.h>#include <sys/stat.h>#include <linux/limits.h>int main(){    int i;    //关闭所有已经打开的文件.........【阅读全文】

阅读(5000) | 评论(0) | 转发(2)

发布时间:2013-03-28 22:24:59

C语言的库函数也很牛逼啊!很牛逼也就导致了很方便,C语言也能很方便的组装SQL语句。实在想不出啥废话了,直接上代码先:#include <stdio.h>#define SQL_SIZE 500int main(){    char sql[SQL_SIZE];    .........【阅读全文】

阅读(2742) | 评论(3) | 转发(2)

发布时间:2013-03-28 22:00:44

1,字符串转整型(一)#include <stdlib.h>int atoi(const char *nptr);字符串转化为整型long atol(const char *nptr);字符串转化为长整型long long atoll(const char *nptr);long long atoq(const char *nptr);字符串转化为long long 类型英文手册很简单,直接上说明:The atoi() function converts the initial.........【阅读全文】

阅读(8583) | 评论(0) | 转发(2)

发布时间:2013-03-24 23:55:20

1,字符串连接char *strcat(char *dest, const char *src);char *strncat(char *dest, const char *src, size_t n);英文manual并不难,直接上英文:The  strcat()  function appends the src string to the dest string, over‐writing the terminating null byte ('\0') at the end of  dest,  an.........【阅读全文】

阅读(6039) | 评论(0) | 转发(3)

发布时间:2013-03-24 17:05:57

1,分割字符串char *strtok(char *str, const char *delim);功能:分解字符串为一组字符串。str为要分解的字符串,delim为分隔符字符串。实质上的处理是,strtok在str中查找包含在delim中的字符并用NULL(’\0′)来替换,直到找遍整个字符串。说明:首次调用时,str指向要分解的字符串,之后再次调用要把str设成NULL。strt.........【阅读全文】

阅读(10587) | 评论(0) | 转发(1)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册