上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 68 下一页
摘要: 1 #include <iostream> 2 #include <boost/config.hpp> 3 //图(矩阵实现) 4 #include <boost/graph/adjacency_matrix.hpp> 5 #include <boost\graph\graph_utility.hp 阅读全文
posted @ 2018-03-28 10:40 喵小喵~ 阅读(383) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 //图 4 #include 5 #include 6 7 using namespace std; 8 using namespace boost; 9 10 //顶点名称 11 enum { A, B, C, D, E, F }; 12 //顶点个数 13 #define N 6 14 const char *na... 阅读全文
posted @ 2018-03-28 10:17 喵小喵~ 阅读(764) 评论(0) 推荐(0) 编辑
摘要: 通过Boost库可以在C++项目中使用正则表达式,配置好环境后链接过程出现”无法打开libboost_regex-vc120-mt-sgd-1_62.lib”的错误. 原因是按照官方生成lib的方法没有生成libboost_regex-vc120-mt-sgd-1_62.lib,需要自己生成这个静态 阅读全文
posted @ 2018-03-27 11:19 喵小喵~ 阅读(525) 评论(0) 推荐(0) 编辑
摘要: ref引用不可以复制的对象 1 void print(std::ostream &os, int i) 2 { 3 os << i << endl; 4 } 5 6 //ref引用不可以复制的对象 7 void main1() 8 { 9 vector<int> myint = { 1,2,3,4, 阅读全文
posted @ 2018-03-26 23:17 喵小喵~ 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 包含的头文件 1 #include <iostream> 2 #include <string> 3 #include <boost/array.hpp> 4 //异构的容器 5 #include <boost/any.hpp> 6 #include <vector> 7 #include <typ 阅读全文
posted @ 2018-03-26 21:22 喵小喵~ 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 //异构的容器 5 #include 6 #include 7 #include 8 #include 9 using namespace std; 10 using namespace boost; 11 12 void main() 13 { 14 boost::arraymyst... 阅读全文
posted @ 2018-03-26 20:18 喵小喵~ 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 客户端 1 #include <iostream> 2 #include<string> 3 #include <boost/asio.hpp> 4 #include <stdlib.h> 5 using namespace std; 6 using namespace boost::asio; 7 阅读全文
posted @ 2018-03-26 18:54 喵小喵~ 阅读(2186) 评论(0) 推荐(0) 编辑
摘要: 客户端 1 #include <boost/asio.hpp> 2 #include <iostream> 3 #include <stdlib.h> 4 using namespace std; 5 using namespace boost::asio; 6 7 void main() 8 { 阅读全文
posted @ 2018-03-26 18:50 喵小喵~ 阅读(861) 评论(0) 推荐(0) 编辑
摘要: node.h 1 #pragma once 2 //创建模板 3 template <class T> 4 class Node 5 { 6 public: 7 T t;//数据 8 Node *pNext;//指针域 9 }; list.h 1 #pragma once 2 #include "N 阅读全文
posted @ 2018-03-26 17:49 喵小喵~ 阅读(190) 评论(0) 推荐(0) 编辑
摘要: C++ 11中的Lambda表达式用于定义并创建匿名的函数对象,以简化编程工作。Lambda的语法形式如下:[函数对象参数](操作符重载函数参数) mutable或exception声明->返回值类型{ 函数体 } 可以看到,Lambda主要分为五个部分:[函数对象参数]、(操作符重载函数参数)、m 阅读全文
posted @ 2018-03-26 17:44 喵小喵~ 阅读(151) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 68 下一页