
c++
面向未来的历史
这个作者很懒,什么都没留下…
展开
-
判断字符串匹配判断 c++
环境: centos c++匹配情况分类1 字符串完全匹配 compare 2 字符串匹配到起始位置 3 字符串匹配到末尾位置 4 字符串匹配在中间位置 5 字符串未能匹配到code#include <iostream>#include <string>int main(){ string str = "abcdef中国汽车"; string t = "bc";原创 2017-10-11 15:48:54 · 2006 阅读 · 0 评论 -
boost安装 c++
自己在一台boost 1.41 的机器上编译使用 boost 1.39 的机器上编写调试的文件时,报错。 使用调用 boost 的语法报错。尝试把机器上的boost 修改为 boost 1.39, 通过boost 网站下载源码编译,安装,依旧报错。 后来在网上查到有人遇到类似的问题,他使用较高的boost版本后,问题就解决了。所以自己就在尝试安装 boost 1_65。 文件的编译问题解决。1 安原创 2017-11-13 17:13:26 · 1070 阅读 · 0 评论 -
error: invalid initialization of reference of type ‘int&’ from expression of type ‘const int’
背景:使用c++ algorithm sort 进行全排,编译报错。例程#include <iostream> // std::cout#include <algorithm> // std::partial_sort#include <vector> // std::vectorusing namespa...原创 2018-05-07 11:15:50 · 20832 阅读 · 0 评论 -
cgo通过动静态库调用c/c++
1 动静态库的区别可以参考: C++静态库与动态库 https://www.cnblogs.com/skynet/p/3372855.html概括:动静态库区别总结:1 链接方式不一样。调用阶段不同动态库在程序运行的时候进行调用,静态库在链接阶段将汇编文件与引用到的库一起链接生成可执行文件。因此前者生成的可执行文件较后者小。 同时,当库文件改变时,动态库只需要重新编译库文件,而静态库需...原创 2018-11-19 12:34:40 · 2814 阅读 · 0 评论