网站首页 站内搜索

搜索结果

查询Tags标签: std,共有 1098条记录
  • 029.程序流程结构-选择结构-switch语句

    #include <iostream> using namespace std; int main() {//switch语句//给一个电影打分int fen;cout << "清输入一个分数" << endl;cin >>fen;cout <<"你输入的是"<< fen <<"分"<< endl;s…

    2021/9/4 9:06:06 人评论 次浏览
  • 029.程序流程结构-选择结构-switch语句

    #include <iostream> using namespace std; int main() {//switch语句//给一个电影打分int fen;cout << "清输入一个分数" << endl;cin >>fen;cout <<"你输入的是"<< fen <<"分"<< endl;s…

    2021/9/4 9:06:06 人评论 次浏览
  • c++ 读取txt文件

    void Load_GPS(const std::string gps_path, std::map<std::string, cv::Point3d> &all_gps_data) {std::ifstream ifs;ifs.open(gps_path);if (!ifs.is_open()){std::cerr << "Can not open gps.txt!" << std::endl;exit(-1);}while (!i…

    2021/9/3 11:05:47 人评论 次浏览
  • c++ 读取txt文件

    void Load_GPS(const std::string gps_path, std::map<std::string, cv::Point3d> &all_gps_data) {std::ifstream ifs;ifs.open(gps_path);if (!ifs.is_open()){std::cerr << "Can not open gps.txt!" << std::endl;exit(-1);}while (!i…

    2021/9/3 11:05:47 人评论 次浏览
  • c++ 11 throw使用

    throw表达式(throw expression):异常检测部分使用throw表达式来表示它遇到了无法处理的问题。throw引发(raise)异常。throw表达式包含关键字throw和紧随其后的一个表达式,其中表达式的类型就是抛出的异常类型。throw表达式后面通常紧跟一个分号,从而构成一条表达式语句…

    2021/9/3 11:05:45 人评论 次浏览
  • c++ 11 throw使用

    throw表达式(throw expression):异常检测部分使用throw表达式来表示它遇到了无法处理的问题。throw引发(raise)异常。throw表达式包含关键字throw和紧随其后的一个表达式,其中表达式的类型就是抛出的异常类型。throw表达式后面通常紧跟一个分号,从而构成一条表达式语句…

    2021/9/3 11:05:45 人评论 次浏览
  • C++中gSOAP的使用

    目录SOAP简介gSOAP准备工作头文件构建客户端应用程序生成soap源码建立客户端项目构建服务端应用程序生成SOAP源码建立服务端项目打印报文SOAP测试项目源码 本文主要介绍C++中gSOAP的使用方法,附带介绍SOAP协议的基础知识,适用于第一次使用gSOAP的开发人员。gSOAP官网上的…

    2021/8/30 22:06:04 人评论 次浏览
  • C++中gSOAP的使用

    目录SOAP简介gSOAP准备工作头文件构建客户端应用程序生成soap源码建立客户端项目构建服务端应用程序生成SOAP源码建立服务端项目打印报文SOAP测试项目源码 本文主要介绍C++中gSOAP的使用方法,附带介绍SOAP协议的基础知识,适用于第一次使用gSOAP的开发人员。gSOAP官网上的…

    2021/8/30 22:06:04 人评论 次浏览
  • C++ 将文件读到 string 的一种简单实现 - rdbuf()

    一种比较简洁的实现:通过 fstream 和 stringstream 的 rdbuf() 实现。 #include <fstream> #include <string> using namespace std;std::string readFileIntoString(const std::string &filename) {std::ifstream ifs(filename);std::ostringstream oss…

    2021/8/30 20:36:17 人评论 次浏览
  • C++ 将文件读到 string 的一种简单实现 - rdbuf()

    一种比较简洁的实现:通过 fstream 和 stringstream 的 rdbuf() 实现。 #include <fstream> #include <string> using namespace std;std::string readFileIntoString(const std::string &filename) {std::ifstream ifs(filename);std::ostringstream oss…

    2021/8/30 20:36:17 人评论 次浏览
  • C++内存管理——unique_ptr

    1. 概述 本想将unique_ptr, shared_ptr和weak_ptr写在同一篇文章中,无奈越(废)写(话)越(连)长(篇),本着不给自己和读者太大压力的原则,最终决定分为三篇去描述它们(不是恶意凑文章数哦)。本篇文章主要描述了unique_ptr,在此之前先给出了auto_ptr的介绍,废话…

    2021/8/30 7:06:38 人评论 次浏览
  • C++内存管理——unique_ptr

    1. 概述 本想将unique_ptr, shared_ptr和weak_ptr写在同一篇文章中,无奈越(废)写(话)越(连)长(篇),本着不给自己和读者太大压力的原则,最终决定分为三篇去描述它们(不是恶意凑文章数哦)。本篇文章主要描述了unique_ptr,在此之前先给出了auto_ptr的介绍,废话…

    2021/8/30 7:06:38 人评论 次浏览
  • C++ 复制文件

    #include <iostream> #include <fstream>int copy_file(const char* SourceFile, const char* TargetFile) {// 创建 std::fstream 流对象std::ifstream in;std::ofstream out;try {// 打开源文件in.open(SourceFile, std::ios::binary);// 打开源文件失败if …

    2021/8/29 22:06:22 人评论 次浏览
  • C++ 复制文件

    #include <iostream> #include <fstream>int copy_file(const char* SourceFile, const char* TargetFile) {// 创建 std::fstream 流对象std::ifstream in;std::ofstream out;try {// 打开源文件in.open(SourceFile, std::ios::binary);// 打开源文件失败if …

    2021/8/29 22:06:22 人评论 次浏览
  • c++字符串操作

    1. string转map 主要用到 std::getline() 和 std::ws #include <map> #include <string> #include <sstream> #include <iostream>std::map<std::string, std::string> mappify1(std::string const& s) {std::map<std::string, std:…

    2021/8/28 22:36:07 人评论 次浏览
扫一扫关注最新编程教程