
C++
文章平均质量分 55
Andos
这个作者很懒,什么都没留下…
展开
-
ubuntu下c++使用mysqlconnector连接mysql数据库
1、安装mysqlconnectorsudo apt-get install libmysqlcppconn-dev2、安装mysqlsudo apt-get install mysql-server使用网上广泛引用的一个测试代码#include #include #include #include #include using namespace std;#i原创 2013-07-05 20:33:34 · 2280 阅读 · 0 评论 -
c++调用python以及使用python将gbk/utf-8转punycode
最近遇到一个需求,关于DNS方面的,由于中文域名采用punycode编码,因此需要将程序中使用gbk的域名转为punycode但是。。。c++的libidn库用起来相比python一句代码转化实在是太恶心了。。。首先安装python-devsudo apt-get install python-dev先看python端的写法,如果只需要看c++如何调用python的可以直接跳过原创 2013-07-11 15:38:42 · 2312 阅读 · 0 评论 -
C++连接mongodb
本文的安装过程以archlinux为例首先安装boostsudo pacman -S boost下载C++ diverhttp://dl.mongodb.org/dl/cxx-driver解压之后,将src中的mongo拷入 /usr/src下用官网的例子,创建一个test.cpp#include #include #include "mongo原创 2013-10-22 17:35:40 · 1660 阅读 · 0 评论 -
解决c/c++编译时 note: this is the location of the previous definition
最近写一个程序,用c++掉用Python编译时一直出现错误note: this is the location of the previous definition查了资料之后发现是一些宏定义被重复定义解决方法很简单把引入的头文件放到第一个就好了即把#include 放到第一行原创 2013-11-03 10:57:28 · 21235 阅读 · 1 评论