会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
deemmo
博客园
首页
新随笔
联系
订阅
管理
2021年12月14日
实验五 模板类与多态
摘要: 四、实验结论 1.实验二 #ifndef PERSON_HPP #define PERSON_HPP #include <iostream> #include <string> #include <utility> using namespace std; class Person { privat
阅读全文
posted @ 2021-12-14 20:01 deemmo
阅读(41)
评论(3)
推荐(0)
2021年12月1日
实验四 继承
摘要: 一、实验任务2 #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: virtual void draw() { std::cout << "Graph::draw() : jus
阅读全文
posted @ 2021-12-01 20:29 deemmo
阅读(43)
评论(3)
推荐(0)
2021年11月8日
实验3 类和对象Ⅱ
摘要: 一、实验结论 1.实验任务4 #ifndef VECTOR_INT_HPP #define VECTOR_INT_HPP #include <iostream> using namespace std; class Vector_int{ public: Vector_int(int nn,int
阅读全文
posted @ 2021-11-08 21:09 deemmo
阅读(57)
评论(3)
推荐(0)
2021年10月29日
实验2 数组、指针与C++标准库
摘要: 四、实验结论 1.实验五 #include <string> #include <iostream> #include <vector> using namespace std; class Info{ public: Info(string nname,string co,string ct,in
阅读全文
posted @ 2021-10-29 17:28 deemmo
阅读(58)
评论(3)
推荐(0)
2021年10月21日
C++实验一 类与对象
摘要: 一、实验结论 1.实验任务3 #include "Complex.hpp" #include <iostream> int main() { using namespace std; Complex c1(5, -3); const Complex c2(2.8); Complex c3(c1);
阅读全文
posted @ 2021-10-21 14:56 deemmo
阅读(221)
评论(3)
推荐(0)
2020年12月27日
实验七 文件相关
摘要: 问题: 运行程序,观察在屏幕上是否正确输出了按分数由高→低排序的信息?同时,在当前路径下,是 否生成了文本文件file3.dat? 尝试用记事本程序打开文件file3.dat,观察里面的数据信息是否是正确的,并且是直观可读的? 结合操作结果回答: 1.是;是; 2.是;是。 实验任务四 1.子任务一
阅读全文
posted @ 2020-12-27 12:51 deemmo
阅读(130)
评论(1)
推荐(0)
2020年12月23日
实验六不晓得是啥相关代码反正就是实验六
摘要: 实验任务一 // P280例8.15 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 //
阅读全文
posted @ 2020-12-23 19:28 deemmo
阅读(50)
评论(1)
推荐(0)
2020年12月9日
实验5 数组和指针
摘要: 实验任务一 #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",
阅读全文
posted @ 2020-12-09 14:21 deemmo
阅读(87)
评论(1)
推荐(0)
2020年11月25日
实验4 函数和数组
摘要: 一、实验任务一 #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(s
阅读全文
posted @ 2020-11-25 20:20 deemmo
阅读(100)
评论(1)
推荐(0)
2020年11月12日
实验3 C语言分支语句和循环语句编程应用(友好猜日期^_^)
摘要: 实验任务一 #include <stdio.h> #include <math.h> int main(){ float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f"
阅读全文
posted @ 2020-11-12 15:10 deemmo
阅读(213)
评论(1)
推荐(0)
下一页
公告