摘要: # ifndef PERSON_H # define PERSON_H # include <iostream> # include <string> # include <iomanip> using namespace std; class Person { private: string na 阅读全文
posted @ 2021-12-13 16:27 wjsx 阅读(12) 评论(2) 推荐(0) 编辑
摘要: #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: void draw() { std::cout << "Graph::draw() : just as an interfac 阅读全文
posted @ 2021-11-26 21:20 wjsx 阅读(16) 评论(3) 推荐(0) 编辑
摘要: #ifndef VECTOR_INT_H #define VECTOR_INT_H # include <iostream> # include <cassert> using namespace std; class Vector_int { public: Vector_int(int n, i 阅读全文
posted @ 2021-11-08 19:04 wjsx 阅读(27) 评论(3) 推荐(0) 编辑
摘要: # ifndef INFO_H # define INFO_H # include <iostream> # include <string> using namespace std; class info { public: info(string a = " ", string b = " ", 阅读全文
posted @ 2021-10-29 20:30 wjsx 阅读(31) 评论(3) 推荐(0) 编辑
摘要: 孙逊 202083290303 阅读全文
posted @ 2021-10-27 17:13 wjsx 阅读(18) 评论(0) 推荐(0) 编辑
摘要: # ifndef COMPLEX_H #define COMPLEX_H # include <iostream> # include <cmath> class Complex{ public: Complex(double a=0,double b=0): real(a),imag(b) {} 阅读全文
posted @ 2021-10-22 11:14 wjsx 阅读(45) 评论(3) 推荐(0) 编辑
摘要: 任务3 1.输出了。同时生成了file3.dat 2.是的 任务4 1.是的、是的生成了二进制文件file4.dat、不是。 2. # include <stdio.h> #include <stdlib.h> typedef struct student { int num; char name[ 阅读全文
posted @ 2020-12-25 19:24 wjsx 阅读(40) 评论(2) 推荐(0) 编辑
摘要: #include<string.h> #define N 5 // 运行程序输入测试时,可以把N改小一些输入测试 typedef struct student { int id; /*学生学号 */ char name[20]; /*学生姓名 */ char subject[20]; /*考试科目 阅读全文
posted @ 2020-12-17 22:29 wjsx 阅读(64) 评论(3) 推荐(0) 编辑
摘要: #include <stdio.h> const int N=3; int main() { int a[N] = {1, 2, 3}; int i; printf("通过数组名及下标直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", &a[i] 阅读全文
posted @ 2020-12-10 23:32 wjsx 阅读(39) 评论(2) 推荐(0) 编辑
摘要: #include <math.h> #include <stdio.h> void solve(double a, double b, double c); int main() { double a, b, c; printf("Enter a, b, c: "); while(scanf("%l 阅读全文
posted @ 2020-11-26 22:22 wjsx 阅读(55) 评论(2) 推荐(0) 编辑