网站首页 站内搜索

搜索结果

查询Tags标签: cout,共有 1241条记录
  • C++插入排序(insertion sort)

    #include<iostream> using namespace std;void createArray(int* arr, int &n) {cout << "Please enter the number of the array: ";cin >> n;cout << "Please enter the elements of the array: ";for (int i = 0;i &l…

    2021/9/12 20:06:35 人评论 次浏览
  • c++学习第一弹

    首先来了解C++ C++语言属于编译型语言,即(计算机对程序的全部指令一次性全部翻译后,再让计算机执行的行为) 我们使用G++型的编译器 软件可以使用Visual C++,Dev-C++等 接下来我们来了解C++程序的基本结构 头文件 是C++程序对其他程序的引用。 include的英文释义是“包…

    2021/9/12 20:05:11 人评论 次浏览
  • c++学习第一弹

    首先来了解C++ C++语言属于编译型语言,即(计算机对程序的全部指令一次性全部翻译后,再让计算机执行的行为) 我们使用G++型的编译器 软件可以使用Visual C++,Dev-C++等 接下来我们来了解C++程序的基本结构 头文件 是C++程序对其他程序的引用。 include的英文释义是“包…

    2021/9/12 20:05:11 人评论 次浏览
  • C++纸的折痕

    // Author:PanDaoxi #include <iostream> using namespace std; int main(){int n,a[100]={0},m=2;cin>>n;a[1]=1;for(int i=2;i<=n;i++){a[i]=a[i-1]+m;m*=2;}cout<<a[n]<<endl;return 0; }

    2021/9/11 22:06:09 人评论 次浏览
  • C++纸的折痕

    // Author:PanDaoxi #include <iostream> using namespace std; int main(){int n,a[100]={0},m=2;cin>>n;a[1]=1;for(int i=2;i<=n;i++){a[i]=a[i-1]+m;m*=2;}cout<<a[n]<<endl;return 0; }

    2021/9/11 22:06:09 人评论 次浏览
  • C++11多线程异步执行耗时程序

    #include <iostream>#include <thread>#include <future>#include <vector>#include <mutex> std::mutex mtx; using namespace std;using namespace chrono; template<typename T>void Measure(T&& func){ auto start = sys…

    2021/9/11 14:05:53 人评论 次浏览
  • C++11多线程异步执行耗时程序

    #include <iostream>#include <thread>#include <future>#include <vector>#include <mutex> std::mutex mtx; using namespace std;using namespace chrono; template<typename T>void Measure(T&& func){ auto start = sys…

    2021/9/11 14:05:53 人评论 次浏览
  • 1012 数字分类c++ 易错点

    一级标题 1012 数字分类c++ 给定一系列正整数,请按要求对数字进行分类,并输出以下 5 个数字: A1 = 能被 5 整除的数字中所有偶数的和; A2 = 将被 5 除后余 1 的数字按给出顺序进行交错求和,即计算 n1−n2+n3−n4 ⋯; A3= 被 5 除后余 2 的数字的个数; A4= 被 5 除后…

    2021/9/11 11:05:29 人评论 次浏览
  • 1012 数字分类c++ 易错点

    一级标题 1012 数字分类c++ 给定一系列正整数,请按要求对数字进行分类,并输出以下 5 个数字: A1 = 能被 5 整除的数字中所有偶数的和; A2 = 将被 5 除后余 1 的数字按给出顺序进行交错求和,即计算 n1−n2+n3−n4 ⋯; A3= 被 5 除后余 2 的数字的个数; A4= 被 5 除后…

    2021/9/11 11:05:29 人评论 次浏览
  • C++智能指针 shared_ptr引用计数分析

    文章目录 前言一、C++ 智能指针shared_ptr总结前言 今天和人争论C++ 智能指针shared_ptr引用计数问题,然后代码实现验证,这里分享给大家。一、C++ 智能指针shared_ptr shared_ptr智能指针是一个类,用于管理new 分配的对象,该智能指针类内部有一个保存引用计数的属性,…

    2021/9/11 1:04:59 人评论 次浏览
  • C++智能指针 shared_ptr引用计数分析

    文章目录 前言一、C++ 智能指针shared_ptr总结前言 今天和人争论C++ 智能指针shared_ptr引用计数问题,然后代码实现验证,这里分享给大家。一、C++ 智能指针shared_ptr shared_ptr智能指针是一个类,用于管理new 分配的对象,该智能指针类内部有一个保存引用计数的属性,…

    2021/9/11 1:04:59 人评论 次浏览
  • 【数据结构】课程设计-学生信息管理系统(双向链表)

    期末课程设计要求程序代码: 运行截图://writing by ZYR //2021-6-25&&26 #include<iostream> #include<string.h> using namespace std; #define OK 1 #define ERROR 0 #define OVERFLOW -2 typedef struct student {char name[20];int score;char …

    2021/9/10 23:09:44 人评论 次浏览
  • 【数据结构】课程设计-学生信息管理系统(双向链表)

    期末课程设计要求程序代码: 运行截图://writing by ZYR //2021-6-25&&26 #include<iostream> #include<string.h> using namespace std; #define OK 1 #define ERROR 0 #define OVERFLOW -2 typedef struct student {char name[20];int score;char …

    2021/9/10 23:09:44 人评论 次浏览
  • C++基础

    构造函数#include <iostream>using namespace std;class Line {public:void setLength( double len );double getLength( void );Line(); // 这是构造函数private:double length; };// 成员函数定义,包括构造函数 Line::Line(void) {cout << "Object i…

    2021/9/10 20:06:48 人评论 次浏览
  • C++基础

    构造函数#include <iostream>using namespace std;class Line {public:void setLength( double len );double getLength( void );Line(); // 这是构造函数private:double length; };// 成员函数定义,包括构造函数 Line::Line(void) {cout << "Object i…

    2021/9/10 20:06:48 人评论 次浏览
扫一扫关注最新编程教程