Chinaunix首页 | 论坛 | 博客
  • 博客访问: 487374
  • 博文数量: 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: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.........【阅读全文】

阅读(8545) | 评论(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.........【阅读全文】

阅读(5998) | 评论(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.........【阅读全文】

阅读(10545) | 评论(0) | 转发(1)

发布时间:2013-03-24 13:29:48

废话不多说,直接上代码:#include <stdio.h>#include <mysql/mysql.h>#define HOST "192.168.56.2"#define DB "webdevtest"#define USER "webdev"#define PWD "webdev"#define PORT 3306int main(){&nbs.........【阅读全文】

阅读(6704) | 评论(0) | 转发(8)

发布时间:2013-03-24 12:17:40

今天周末,一大早就起床写了个简单的用C访问mysql的程序,当然是作为学习测试用的了。但编译过程中遭遇了找不到头文件的问题。my-acer ~/c $ gcc -o mysql_test mysql_test.c -lmysqlclientmysql_test.c:2:19: fatal error: mysql.h: No such file or directorycompilation terminated.........【阅读全文】

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

登录 注册