网站首页 站内搜索

搜索结果

查询Tags标签: cout,共有 1241条记录
  • c++纯虚类

    纯虚函数 类中没有实现的虚函数,叫做纯虚函数。 用来强制子类必须实现的接口。 抽象类/纯虚类 拥有纯虚函数的类叫做纯虚类。 纯虚类不能用来构造对象。 #include<iostream> #include<string> using namespace std; class View//不能实例化 { public:virtual…

    2021/9/27 1:12:45 人评论 次浏览
  • c++纯虚类

    纯虚函数 类中没有实现的虚函数,叫做纯虚函数。 用来强制子类必须实现的接口。 抽象类/纯虚类 拥有纯虚函数的类叫做纯虚类。 纯虚类不能用来构造对象。 #include<iostream> #include<string> using namespace std; class View//不能实例化 { public:virtual…

    2021/9/27 1:12:45 人评论 次浏览
  • c++程序设计视频学习(第六天)

    5.2.1 一维数组定义 数组特点: 1.放在一块连续的内存空间中 2.数组中每个元素都是相同数据类型 定义方式: 1. 数据类型 数组名[ 数组长度 ] #include <iostream> using namespace std;int main() {//数组//1. 数据类型 数组名[ 数组长度 ]int arr[5];arr[0] = 10;…

    2021/9/27 1:10:57 人评论 次浏览
  • c++程序设计视频学习(第六天)

    5.2.1 一维数组定义 数组特点: 1.放在一块连续的内存空间中 2.数组中每个元素都是相同数据类型 定义方式: 1. 数据类型 数组名[ 数组长度 ] #include <iostream> using namespace std;int main() {//数组//1. 数据类型 数组名[ 数组长度 ]int arr[5];arr[0] = 10;…

    2021/9/27 1:10:57 人评论 次浏览
  • day - 5 基础知识总结&问题解决

    static分文件操作 //文件1 int x = 10; static int y = 100; //文件2 #include <iostream> using namespace std;extern int x; extern int y;int main() {cout << x << y ;return 0; } //undefined reference to `y,系统报错,可以知道static修饰变量…

    2021/9/25 23:14:55 人评论 次浏览
  • day - 5 基础知识总结&问题解决

    static分文件操作 //文件1 int x = 10; static int y = 100; //文件2 #include <iostream> using namespace std;extern int x; extern int y;int main() {cout << x << y ;return 0; } //undefined reference to `y,系统报错,可以知道static修饰变量…

    2021/9/25 23:14:55 人评论 次浏览
  • C++实现猜数游戏(源代码)

    #include <bits/stdc++.h> using namespace std;void Start(); void GetResults();int i, j, life, maxrand; char c;void Start() {i = 0;j = 0;life = 0;maxrand = 6;cout << "选一个等级:\n"; // the user has to select a difficutly levelcout…

    2021/9/25 22:40:42 人评论 次浏览
  • C++实现猜数游戏(源代码)

    #include <bits/stdc++.h> using namespace std;void Start(); void GetResults();int i, j, life, maxrand; char c;void Start() {i = 0;j = 0;life = 0;maxrand = 6;cout << "选一个等级:\n"; // the user has to select a difficutly levelcout…

    2021/9/25 22:40:42 人评论 次浏览
  • c++ DLL动态库编程

    1、创建动态库 2、在头文件pch.h中声名函数 //在头文件pch.h中声名函数 extern "C" {_declspec(dllexport) int myAdd(int n, int m);_declspec(dllexport) int mySub(int n, int m); } 3、在pch.cpp中编写函数实现 // pch.cpp: 与预编译标头对应的源文件#inclu…

    2021/9/25 12:10:52 人评论 次浏览
  • c++ DLL动态库编程

    1、创建动态库 2、在头文件pch.h中声名函数 //在头文件pch.h中声名函数 extern "C" {_declspec(dllexport) int myAdd(int n, int m);_declspec(dllexport) int mySub(int n, int m); } 3、在pch.cpp中编写函数实现 // pch.cpp: 与预编译标头对应的源文件#inclu…

    2021/9/25 12:10:52 人评论 次浏览
  • c++程序设计视频学习(第四天)

    嵌套if语句:在if语句中嵌套if语句 #include <iostream> using namespace std;int main() {//选择结构 //输入一个考试分数,如果大于600分,考上一本大学,在屏幕输出//大于500,考上二本大学,大于400,考上三本大学,小于等于400分,未考上本科//在一本分数中,如…

    2021/9/25 11:11:26 人评论 次浏览
  • c++程序设计视频学习(第四天)

    嵌套if语句:在if语句中嵌套if语句 #include <iostream> using namespace std;int main() {//选择结构 //输入一个考试分数,如果大于600分,考上一本大学,在屏幕输出//大于500,考上二本大学,大于400,考上三本大学,小于等于400分,未考上本科//在一本分数中,如…

    2021/9/25 11:11:26 人评论 次浏览
  • 2021-09-24作业

    #include <cstdio> using namespace std; int main() { cout<<"v v"<<endl; cout<<" v v "<<endl; cout<<" v "<<endl; return 0; } #include <stdio…

    2021/9/24 23:11:25 人评论 次浏览
  • 2021-09-24作业

    #include <cstdio> using namespace std; int main() { cout<<"v v"<<endl; cout<<" v v "<<endl; cout<<" v "<<endl; return 0; } #include <stdio…

    2021/9/24 23:11:25 人评论 次浏览
  • C++STL全排列

    STL的全排列函数 next_permutation(a + 1, a + 1 + n); #include <bits/stdc++.h> using namespace std; typedef long long LL; #define inf 0x3f3f3f3f int a[100]; int main() {int n;cin >> n;for (int i = 1; i <= n;i++){a[i] = i;}do{for (int i =…

    2021/9/24 22:40:36 人评论 次浏览
扫一扫关注最新编程教程