会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
chenziming114514
博客园
首页
新随笔
联系
订阅
管理
2024年12月17日
实验6 模板类、文件I/O和异常处理
摘要: 实验任务4 代码 Vector.hpp 1 #pragma once 2 #include <iostream> 3 #include <stdexcept> 4 5 template <typename T> 6 class Vector { 7 public: 8 // 构造函数 9 Vecto
阅读全文
posted @ 2024-12-17 16:07 臣子民
阅读(30)
评论(0)
推荐(0)
2024年12月9日
实验5 继承和多态
摘要: 实验任务3 代码 pets.hpp 1 #pragma once 2 #include <iostream> 3 #include <string> 4 using namespace std; 5 6 class MachinePets { 7 public: 8 MachinePets(cons
阅读全文
posted @ 2024-12-09 10:55 臣子民
阅读(19)
评论(0)
推荐(0)
2024年11月24日
实验4 类的组合、继承、模板类、标准库
摘要: 实验任务2 代码 GradeCalc.hpp 1 #include <iostream> 2 #include <vector> 3 #include <string> 4 #include <algorithm> 5 #include <numeric> 6 #include <iomanip>
阅读全文
posted @ 2024-11-24 16:27 臣子民
阅读(16)
评论(0)
推荐(0)
2024年11月11日
实验3 类和对象_基础编程2
摘要: 实验任务1 代码 button.hpp 1 #pragma once 2 3 #include <iostream> 4 #include <string> 5 6 using std::string; 7 using std::cout; 8 9 // °´Å¥Àà 10 class Button
阅读全文
posted @ 2024-11-11 11:17 臣子民
阅读(31)
评论(0)
推荐(0)
2024年10月29日
实验2 类和对象_基础编程1
摘要: 实验任务1 代码 t.h 1 #pragma once 2 #include <string> 3 4 class T { 5 public: 6 T(int x = 0, int y = 0); 7 T(const T &t); 8 T(T &&t); 9 ~T(); 10 11 void adj
阅读全文
posted @ 2024-10-29 20:51 臣子民
阅读(42)
评论(0)
推荐(0)
2024年10月15日
实验1 现代C++编程初体验
摘要: 实验任务1 代码 #include <iostream> #include <vector> #include <string> #include <algorithm> #include <numeric> #include <iomanip> using namespace std; templ
阅读全文
posted @ 2024-10-15 18:29 臣子民
阅读(18)
评论(0)
推荐(0)
2023年12月21日
实验7
摘要: 实验任务4 代码 1 #include<stdio.h> 2 #define N 100 3 #define M 100 4 int main(){ 5 FILE *fp; 6 char a[N][M]; 7 int i,j=0,k=0,s=0; 8 fp=fopen("data4.txt","r"
阅读全文
posted @ 2023-12-21 12:33 臣子民
阅读(24)
评论(0)
推荐(0)
2023年12月11日
实验6 C语言结构体、枚举应用编程
摘要: 实验任务4 代码task4.c 1 #include <stdio.h> 2 #define N 10 3 4 typedef struct { 5 char isbn[20]; // isbn号 6 char name[80]; // 书名 7 char author[80]; // 作者 8 d
阅读全文
posted @ 2023-12-11 16:56 臣子民
阅读(58)
评论(0)
推荐(0)
2023年11月27日
实验5 C语言指针应用编程
摘要: 实验任务1 代码task1_1.c 1 #include <stdio.h> 2 #define N 5 3 4 void input(int x[], int n); 5 void output(int x[], int n); 6 void find_min_max(int x[], int n
阅读全文
posted @ 2023-11-27 17:11 臣子民
阅读(19)
评论(0)
推荐(0)
2023年11月19日
实验4 C语言数组应用编程
摘要: 实验任务1 代码task1_1.c 1 #include<stdio.h> 2 #define N 4 3 4 void test1(){ 5 int a[N] = {1, 9, 8, 4}; 6 int i; 7 8 printf("sizeof(a) = %d\n", sizeof(a)); 9
阅读全文
posted @ 2023-11-19 15:58 臣子民
阅读(47)
评论(0)
推荐(0)
下一页
公告