网站首页 站内搜索

搜索结果

查询Tags标签: std,共有 1098条记录
  • libwebp 解码 webp格式的图片或者动画【源码】

    #include <stdio.h> #include <math.h> #include <stdlib.h> #include <fstream> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <webp/decode.h> #include <webp/demux.h> …

    2021/10/1 11:40:43 人评论 次浏览
  • libwebp 解码 webp格式的图片或者动画【源码】

    #include <stdio.h> #include <math.h> #include <stdlib.h> #include <fstream> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <webp/decode.h> #include <webp/demux.h> …

    2021/10/1 11:40:43 人评论 次浏览
  • std::get<C++11多线程库~线程管理>(08):转移线程所有权(1)

    1 #include <QCoreApplication>2 #include <thread>3 #include <iostream>4 5 /*6 * 话题1:转移线程的所有权。7 * std::thread 构造函数需传入一个函数或可调用对象, 每一个 std::thread 都关联着一个函数或可调用对象。8 * 两者之间的关…

    2021/10/1 11:11:25 人评论 次浏览
  • std::get<C++11多线程库~线程管理>(08):转移线程所有权(1)

    1 #include <QCoreApplication>2 #include <thread>3 #include <iostream>4 5 /*6 * 话题1:转移线程的所有权。7 * std::thread 构造函数需传入一个函数或可调用对象, 每一个 std::thread 都关联着一个函数或可调用对象。8 * 两者之间的关…

    2021/10/1 11:11:25 人评论 次浏览
  • c++函数分类以及调用

    #include<bits/stdc++.h> using namespace std;//1.构造函数分类和调用 //按参数分类 无参构造(默认) 有参构造 //类型分类 普通构造 拷贝构造 class Person { public://构造函数Person(){cout << "无参函数调用" << endl;}Person(int a…

    2021/9/30 14:10:43 人评论 次浏览
  • c++函数分类以及调用

    #include<bits/stdc++.h> using namespace std;//1.构造函数分类和调用 //按参数分类 无参构造(默认) 有参构造 //类型分类 普通构造 拷贝构造 class Person { public://构造函数Person(){cout << "无参函数调用" << endl;}Person(int a…

    2021/9/30 14:10:43 人评论 次浏览
  • c++ 函数内避免多次使用new 和 delete的用法

    把你的new改为 std::vector<char> buffer; buffer.resize(...);memcpy(buffer.data(),....);然后send(std::move(buffer)); 这样只有一次new内存操的作既然用了C++,尽量使用C++的思想,不要再new buffer ; delete buffer ; 了,用std::string 或 std::vector<ch…

    2021/9/30 9:10:54 人评论 次浏览
  • c++ 函数内避免多次使用new 和 delete的用法

    把你的new改为 std::vector<char> buffer; buffer.resize(...);memcpy(buffer.data(),....);然后send(std::move(buffer)); 这样只有一次new内存操的作既然用了C++,尽量使用C++的思想,不要再new buffer ; delete buffer ; 了,用std::string 或 std::vector<ch…

    2021/9/30 9:10:54 人评论 次浏览
  • 23 C++ 学习记 指针和数组

    #include<iostream> using namespace std;int main() {// 定义数组int arr[] = { 1,2,3,4,5,6,7 };// 计算数组长度int arrLength = sizeof(arr) / sizeof(arr[0]);cout << "数组中元素所占字节:" << sizeof(arr[0]) << endl;// 定义指…

    2021/9/30 1:11:02 人评论 次浏览
  • 23 C++ 学习记 指针和数组

    #include<iostream> using namespace std;int main() {// 定义数组int arr[] = { 1,2,3,4,5,6,7 };// 计算数组长度int arrLength = sizeof(arr) / sizeof(arr[0]);cout << "数组中元素所占字节:" << sizeof(arr[0]) << endl;// 定义指…

    2021/9/30 1:11:02 人评论 次浏览
  • RE2—C++

    参考:正则表达式(Regular Expression) — Chuanqi 的技术文档 "\"\\\.\. 一、函数细节 1. GlobalReplace() RE2::GlobalReplace(str, pat, new_sub_str ):将句子str中匹配到的子串替换为new_sub_str std::string aInput = "~/Test (Folder)/"; …

    2021/9/29 20:12:13 人评论 次浏览
  • RE2—C++

    参考:正则表达式(Regular Expression) — Chuanqi 的技术文档 "\"\\\.\. 一、函数细节 1. GlobalReplace() RE2::GlobalReplace(str, pat, new_sub_str ):将句子str中匹配到的子串替换为new_sub_str std::string aInput = "~/Test (Folder)/"; …

    2021/9/29 20:12:13 人评论 次浏览
  • C++多线程编程第四讲--创建多个线程、数据共享问题分析、案例代码

    //(1)创建和等待多个线程 #include<iostream> #include<thread> #include<vector>using namespace std;void myprint(int num) {cout << "this thread id = " << std::this_thread::get_id() << " num = " <&…

    2021/9/28 9:11:04 人评论 次浏览
  • C++多线程编程第四讲--创建多个线程、数据共享问题分析、案例代码

    //(1)创建和等待多个线程 #include<iostream> #include<thread> #include<vector>using namespace std;void myprint(int num) {cout << "this thread id = " << std::this_thread::get_id() << " num = " <&…

    2021/9/28 9:11:04 人评论 次浏览
  • C++ 递归函数调用

    #include <iostream> void Call(int n) {std::cout << "Call: " << n << std::endl;if (n > 0){Call(n - 1); //调用自己} } int main() {Call(10);system("pause");return 0; }结果

    2021/9/27 20:11:13 人评论 次浏览
扫一扫关注最新编程教程