搜索结果
查询Tags标签: cout,共有 1241条记录-
C++多线程编程第九讲--future其他成员函数、shared_future、atomic
//(1)std::future的其他成员函数#include<iostream> #include<mutex> #include<thread> #include<future>using namespace std;int my_thread() {cout << "my_thread start... " << "thread id = " << th…
2021/10/26 9:10:21 人评论 次浏览 -
c++实验报告 实验
complex.cpp文件源码:#ifndef COMPLEX_HPP #define COMPLEX_HPP #include <iostream> #include <cmath> class Complex { public:Complex() {};//默认构造函数~Complex() {};//析构函数Complex(double r, double i = 0) :real(r), imag(i) {};Complex(const …
2021/10/26 1:10:08 人评论 次浏览 -
c++实验报告 实验
complex.cpp文件源码:#ifndef COMPLEX_HPP #define COMPLEX_HPP #include <iostream> #include <cmath> class Complex { public:Complex() {};//默认构造函数~Complex() {};//析构函数Complex(double r, double i = 0) :real(r), imag(i) {};Complex(const …
2021/10/26 1:10:08 人评论 次浏览 -
第5章 语句
1-noskipws,不舍弃空白字符 noskipws 2-tolower,转小写字符 3-cin.eof() 结束符 cin.eof() 4-isupper(), 是否是大写字符 5-cin连续输入int main(void) {int i, j;std::cin >> i >> j;if (j == 0)throw std::runtime_error("divisor is 0");std::…
2021/10/25 23:10:47 人评论 次浏览 -
第5章 语句
1-noskipws,不舍弃空白字符 noskipws 2-tolower,转小写字符 3-cin.eof() 结束符 cin.eof() 4-isupper(), 是否是大写字符 5-cin连续输入int main(void) {int i, j;std::cin >> i >> j;if (j == 0)throw std::runtime_error("divisor is 0");std::…
2021/10/25 23:10:47 人评论 次浏览 -
C++ 输入输出流
一、概览 C++ 中用于实现数据输入和输出的这些流类以及它们之间的关系:istream:常用于接收从键盘输入的数据; ostream:常用于将数据输出到屏幕上; ifstream:用于读取文件中的数据; ofstream:用于向文件中写入数据; iostream:继承自 istream 和 ostream 类,因为…
2021/10/25 20:41:48 人评论 次浏览 -
C++ 输入输出流
一、概览 C++ 中用于实现数据输入和输出的这些流类以及它们之间的关系:istream:常用于接收从键盘输入的数据; ostream:常用于将数据输出到屏幕上; ifstream:用于读取文件中的数据; ofstream:用于向文件中写入数据; iostream:继承自 istream 和 ostream 类,因为…
2021/10/25 20:41:48 人评论 次浏览 -
面向对象程序设计实验一
实验任务3: Complex.hpp:#include <iostream> #include <cmath> class Complex { public:Complex() {};Complex(double r, double i = 0) :real(r), imag(i) {};Complex(Complex& p);double get_real()const { return real; };//常成员函数double get_im…
2021/10/25 20:39:56 人评论 次浏览 -
面向对象程序设计实验一
实验任务3: Complex.hpp:#include <iostream> #include <cmath> class Complex { public:Complex() {};Complex(double r, double i = 0) :real(r), imag(i) {};Complex(Complex& p);double get_real()const { return real; };//常成员函数double get_im…
2021/10/25 20:39:56 人评论 次浏览 -
实验一 类与对象
Complex.hpp#ifndef COMPLEX_HPP #define COMPLEX_HPP#include <iostream> #include <cmath> #include <iomanip>class Complex { public:Complex(double real0 = 0, double imag0 = 0) :real(real0), imag(imag0) {}~Complex() = default;Complex(cons…
2021/10/25 6:11:58 人评论 次浏览 -
实验一 类与对象
Complex.hpp#ifndef COMPLEX_HPP #define COMPLEX_HPP#include <iostream> #include <cmath> #include <iomanip>class Complex { public:Complex(double real0 = 0, double imag0 = 0) :real(real0), imag(imag0) {}~Complex() = default;Complex(cons…
2021/10/25 6:11:58 人评论 次浏览 -
质数的判断
WMS的第一次博客orz 背景:给一个数,判断是否为质数。 代码如下: #include<iostream> using namespace std; #define cout(x) printf("%d",x) #define cin(x) scanf("%d",&x) #define ll long long int a[1100]; int main(){int n; cin&g…
2021/10/25 6:10:13 人评论 次浏览 -
质数的判断
WMS的第一次博客orz 背景:给一个数,判断是否为质数。 代码如下: #include<iostream> using namespace std; #define cout(x) printf("%d",x) #define cin(x) scanf("%d",&x) #define ll long long int a[1100]; int main(){int n; cin&g…
2021/10/25 6:10:13 人评论 次浏览 -
自己随手写的电脑程序
#include<iostream> #include<windows.h> #include<cstdlib> #include<ctime> #include<unistd.h> #include<cmath> #include<stdlib.h> using namespace std; int main() {char E,G,H,I;int a,b,c,i,d,j,k,l,e,f,g,h,m,n,o,p,…
2021/10/24 17:11:18 人评论 次浏览 -
自己随手写的电脑程序
#include<iostream> #include<windows.h> #include<cstdlib> #include<ctime> #include<unistd.h> #include<cmath> #include<stdlib.h> using namespace std; int main() {char E,G,H,I;int a,b,c,i,d,j,k,l,e,f,g,h,m,n,o,p,…
2021/10/24 17:11:18 人评论 次浏览