
Vc++
文章平均质量分 93
lilin020401
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
rapidxml 文件读写,增加删除节点
RapidXml是指 XML DOM解析工具包,是一个快速的读写xml文件的库文件(hpp)。本文旨在提供RapidXml文件读写操作,以及对节点的增加、删除、编译提供一个测试用例,以免忘记。1. 读取XML#include "rapidxml.hpp"#include "rapidxml_utils.hpp"#include "rapidxml_print.hpp"#includ...原创 2019-11-18 14:57:23 · 1381 阅读 · 0 评论 -
C++11 使用 std::async创建异步程序
C++11 使用 std::async创建异步程序最近用到异步线程挂起任务,而c++11提供了std::async方便快捷的创建线程,该函数使得我们的并发调用变得简单,优雅。参考了下面几个博客,对它们的内容进行了整合,谢谢作者的无私奉献,这里仅为自己做记录参考。https://www.cnblogs.com/KunLunSu/p...原创 2019-10-10 23:59:00 · 877 阅读 · 2 评论 -
字符串切割等操作
static void SplitString1(const std::string& srcStr, std::vector<std::string>& vec, const std::string& separatpor ){ std::string::size_type posSubStringStart; //子串起始位置 st...原创 2019-07-25 02:16:37 · 168 阅读 · 0 评论 -
数据转换为字符串
#include <string>#include <vector>#include <boost/lexical_cast.hpp>#include <boost/alogrithm/string.hpp>//ostringstream对象用来进行格式化的输出,常用于将各种类型转换为string类型//ostringstream只支持...原创 2019-07-25 02:12:14 · 491 阅读 · 0 评论 -
C++之单例模式
参考:https://www.cnblogs.com/gccbuaa/p/7268313.html参考:https://blog.csdn.net/fchyang/article/details/81449580单例模式是应用最多的一种设计模式,它要求每个类有且只能有一个实例对象,所以用C++设计一个单例模式的方法如下: 1 构造函数声明为私有,这样就保证了不能随意构造一...原创 2019-07-25 00:04:29 · 192 阅读 · 0 评论 -
tesseract-ocr在vs2010下面的安装调试
前面已经讲解了tesseract-ocr在vs2008下面的安装调用,这里总结下在vs2010下面的调试,基本和vs2008一样,就是安装目录下lib里面 libtesseract302d.dll 是针对VS2008的,需要用一个vs2010编译出的替换下来才可以在VS2010下正常使用。一、本文用的是tesseract-ocr-3.02.02的下载地址:http://code原创 2014-12-13 13:12:50 · 1213 阅读 · 2 评论 -
Linux下制定路径下 c创建文件夹 名字用时间来命名
在给定的路径下建立2级目录,第一个目录是输入字符串的ID号,第二级目标是系统时间#include #include #include#include#include #include #include int main(){//获取当前时间的函数 time_t nowtime; struct tm *timei原创 2015-01-31 15:57:50 · 2327 阅读 · 0 评论 -
string erase函数的运用
erase函数的原型如下所示:(1)string& erase ( size_t pos = 0, size_t n = npos );(2)iterator erase ( iterator position );(3)iterator erase ( iterator first, iterator last );也就是说有三种用法:(1)erase(pos,n); 删除从pos开始的n个字符原创 2014-11-02 22:32:10 · 760 阅读 · 0 评论 -
C++中string类的简单转换
1、 int 类型转为string类型我找了有两种实现方法原创 2014-11-02 23:13:21 · 693 阅读 · 0 评论 -
ubuntu中从同一个文件夹中读取无命名规则的多个文件
#include <stdio.h>#include <string>#include <math.h>#include <glob.h>#include <cv.h>#include <highgui.h>#include <cxcore.h>using names...原创 2014-09-10 22:27:36 · 559 阅读 · 0 评论