C++ DLL的制作与使用 c/c++

制作DLL // calc.h #ifdef EXPORT_DLL #define CALC_API __declspec(dllexport) #else #define CALC_API __declspec(dllimport) #endif extern "C" { CALC_API int 加(int a, int b); CAL...
benojan 发布于 

boost的字符串操作 c/c++

头文件 #include <boost/algorithm/string.hpp> 功能 字符串切割 boost::algorithm::split() using namespace boost::algorithm; int main() { std::string s = "Boost C++ Libraries"; s...
benojan 发布于 
article cover

c++程序的编码与字符集的转换 c/c++

一、程序相关的编码 程序源文件编码 程序源文件编码是指保存程序源文件内容所使用的编码方案,该编码方案可在保存文件的时候自定义。 通常在简体中文windows环境下,各种编辑器(包括visual studio)新建文件缺省编码都是GB18030。 所以不特别指定的话,在windows环境下,c++源文件的编码通常为GB18030(GB18030兼容GBK)...
benojan 发布于