![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
xiao an 001
这个作者很懒,什么都没留下…
展开
-
linux中sqlite3的使用及c++使用sqlite3
linux中sqlite3的使用及c++使用sqlite3sqlite3的安装链接:https://pan.baidu.com/s/1hF6veG5XdrXv167Tehga2g提取码:qf5w1 下载安装包,本目录已提供,并解压,2 ./configure;3 make;4 sudo make install;c/c++中,对sqlite3的使用#include <iostream>#include <sqlite3.h>#define原创 2020-08-24 21:02:35 · 655 阅读 · 0 评论 -
c++json的使用、json.hpp的初步使用
c++json的使用、json.hpp的初步使用#include "json.hpp"//只需包含该头文件#include <iostream>using json = nlohmann::json;//注明空间using namespace std;/***创建json****/json root;root["name"] = "aa";root["id"] = 1;json root2;root2["one"] = root;//可包含另一个jsonstring原创 2020-08-24 20:49:02 · 4196 阅读 · 3 评论 -
c++中对int型变量输入char型异常
c++中对int型变量输入char型异常在使用c++编程时,如果要使用名字空间std,常用using namespace std;正规一点的使用则是using std::cin和using std::cout.当定义了一个int型的变量a,使用cin >> a,如果输入了一个字符,程序便会异常结束。跟c语言不太一样。在这里采用的排出异常的方式是:#include <iostream>using std::cin;using std::cout;int Del(){原创 2020-08-24 21:09:26 · 1248 阅读 · 0 评论 -
c++中string类型的常用方法,以及map的使用
c++中string类型的常用方法,以及map的使用#include <iostream>#include <map>using namespace std;string str = "helloworld";char * buf = (char *)str.data();//string转char *型int n = 100;string n_str = std::to_string(n);//int型转string型string str_str = "100原创 2020-08-24 21:05:07 · 1499 阅读 · 0 评论