2015年9月8日
摘要: 1 #include 2 #include 3 4 #include 5 6 #include 7 8 int main() 9 {10 // 初始化MYSQL 实例11 MYSQL *ms_conn = mysql_init(NULL);12 if (ms_... 阅读全文
posted @ 2015-09-08 15:38 独孤酷酷 阅读(1166) 评论(0) 推荐(0) 编辑
  2015年9月7日
摘要: 1 #include 2 #include 3 #include 4 5 #include 6 7 8 9 int main() 10 { 11 MYSQL *ms_conn = mysql_init(NULL); 12 if (ms_conn =... 阅读全文
posted @ 2015-09-07 15:36 独孤酷酷 阅读(1217) 评论(0) 推荐(0) 编辑
摘要: 1 enum enum_field_types { 2 MYSQL_TYPE_DECIMAL, 3 MYSQL_TYPE_TINY, 4 MYSQL_TYPE_SHORT, 5 MYSQL_TYPE_LONG, 6 MYSQL_TYPE_FLOAT,... 阅读全文
posted @ 2015-09-07 15:16 独孤酷酷 阅读(4293) 评论(1) 推荐(0) 编辑
摘要: MYSQL * mysql_real_connect( MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const... 阅读全文
posted @ 2015-09-07 11:54 独孤酷酷 阅读(2537) 评论(0) 推荐(0) 编辑
摘要: MYSQL * mysql_init(MYSQL *mysql); // 初始化一个MYSQL 连接的实例对象void mysql_close(MYSQL *sock); // 释放一个MYSQL 连接实例这个函数有两种用法:1、参数传NULL 值。 // 这种情况很显然,是mys... 阅读全文
posted @ 2015-09-07 11:18 独孤酷酷 阅读(6314) 评论(0) 推荐(0) 编辑
  2015年9月6日
摘要: 1 #include 2 #include 3 #include 4 5 #include 6 7 8 int main() 9 {10 // MYSQL 初始化11 MYSQL *ms_conn = mysql_init(NULL);12 if (m... 阅读全文
posted @ 2015-09-06 18:35 独孤酷酷 阅读(278) 评论(0) 推荐(0) 编辑
  2015年8月24日
摘要: 1 using MySql.Data.MySqlclient; // 引进MYSQL 库 2 3 // C# 连接 MYSQL 数据库更好的方法 4 5 void func_02() 6 { 7 string str_conn_info = ""; 8 ... 阅读全文
posted @ 2015-08-24 12:18 独孤酷酷 阅读(213) 评论(0) 推荐(0) 编辑
  2015年8月12日
摘要: 1 #include 2 #include 3 4 int main() 5 { 6 const char the_text[] = "this is test text!"; 7 8 // 在C 语言中输出等宽度的显示我们一般采用的是在前面加数字的方法, 9 pr... 阅读全文
posted @ 2015-08-12 11:48 独孤酷酷 阅读(738) 评论(0) 推荐(0) 编辑
  2015年5月9日
摘要: dirname basename 截取路径中的目录以及文件名windows 下面:#include "shlwapi.h"#pragma comment(lib, "shlwapi.lib ")LPTSTR PathFindFileName(LPCTSTR pPath)功能:获得路径中的文件名例:... 阅读全文
posted @ 2015-05-09 12:31 独孤酷酷 阅读(399) 评论(0) 推荐(0) 编辑
  2015年5月8日
摘要: 1 // singleton.h 2 3 #ifndef SINGLETON_H 4 #define SINGLETON_H 5 6 // 单例基类模板 7 template 8 class Singleton 9 {10 public:11 static T& give_me()1... 阅读全文
posted @ 2015-05-08 23:00 独孤酷酷 阅读(286) 评论(0) 推荐(0) 编辑