实验

实验6

#include <iostream> #include "Vector.hpp" void test() { using namespace std; int n; cin >> n; Vector<double> x1(n); for (auto i = 0; i < n; ++i) x1.at ......

关于“内网穿透”的一些知识(续4)—— “内网穿透”的个人实验环境的搭建

前文: 关于“内网穿透”的一些知识(续3)—— NAT类型判断 ......
环境 知识 个人

实验7

#include <stdio.h> #include <string.h> #define N 5 #define M 80 int main() { char songs[N][M]; FILE* fp; fp = fopen("data4.txt", "r"); if (fp == NULL) ......

实验6

task 1.1 #include <stdio.h>#include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数组改小一些输入测试 typedef struct student { int id; // 学号 char name[20]; // 姓名 ch ......

实验6 模板类、文件I/O和异常处理

实验任务4 1 #pragma once 2 #include <iostream> 3 #include <stdexcept> 4 5 template <class T> 6 class Vector { 7 private: 8 T* data; 9 size_t size; 10 11 p ......
模板 文件

综合实验1

综合实验1 目录综合实验11.实验目的2.实验分析3.具体步骤4.遇到的问题5.优化6.总结(一些知识或者不熟的配置) 拓扑 1.实验目的 内网互通,并且配置无线。内网要能访问到外网的DNS服务器,内网接入和核心之间要增加链路可靠性,另一边的私网服务器需要映射,让另一边的私网能够访问 2.实验分析 ......

实验6 C语言结构体、枚举应用编程

实验任务4: #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 ......
语言 结构

实验六歧路与纠错

一、歧路 实验六的程序不算太难,因此我一下午就写完了(好像也挺久),但执行起来却不符合我的预期。 总是存在这样的问题: 输入3个及以上数据时,直接输出的是正确数据,可排序后输出总会有至少一个结构体内的数据是乱的,不是我输入进去的数据。 花费一个下午,可以说有一半时间是因为这个原因。 而且,即使我把程 ......
歧路

实验6

task 4 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 ......

实验6 C语言结构体、枚举应用编程

task1 1 // P286例8.17 2 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 3 // 打印不及格学生信息和所有学生信息程分别调用 4 5 #include <stdio.h> 6 #include <string.h> 7 #define N 3 // 运行程 ......
语言 结构

实验六

实验一源代码 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数组改小一些输入测试 typedef struct student { int id; // 学号 char name[20]; // 姓名 cha ......

实验六

task1.c // P286例8.17 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include <stdio.h> #include<stdlib.h> #include <string.h> #define N 3 ......

实验6 C语言结构体、枚举应用编程

1、实验1 运行结果 2、实验2 源代码 1 #include <stdio.h> 2 #include <string.h> 3 #define N 10 4 #define M 80 5 6 typedef struct { 7 char name[M]; // 书名 8 char author ......
语言 结构

实验6 模板类、文件IO和异常处理

任务4 1 #include <iostream> 2 #include "Vector.hpp" 3 4 void test() { 5 using namespace std; 6 7 int n; 8 cin >> n; 9 10 Vector<double> x1(n); 11 for (a ......
模板 文件

实验6 模板类、文件IO和异常处理

实验任务4 #pragma once #include<iostream> #include<stdexcept> using namespace std; template<typename T> class Vector { public: Vector(int n); Vector(int n ......
模板 文件

实验六

#include <iostream> #include <stdexcept> template <typename T> class Vector { private: int size; T *vec; public: Vector<T>() = default; Vector<T>(int ......

实验六、模板类,文件I/O流,异常处理

实验四: Vector.hpp: // #pragma once #include <iostream> #include <stdexcept> using namespace std; template <typename T> class Vector { private: T* data; ......
模板 文件

实验6

任务1 task1 #include "Complex.hpp" #include <iostream> #include <fstream> #include <stdexcept> // 测试1:复数模板类测试 void test1() { using namespace std; Comple ......

实验7

test 1: 第n 条数据为空,并且无法输出第一天条数据 test 2: 用feof test 4: #include<stdio.h> int main() { FILE* fp; fp = fopen("E:\\whatever666", "r"); char qwe; int q = 0; ......

实验六 模板类,文件io和异常处理

实验任务4 #pragma once #include <iostream> #include <stdexcept> using std::cout; using std::endl; template <typename T> class Vector { public: // 构造函数,默认大 ......
模板 文件

实验6

实验4 1 #include <stdio.h> 2 #include<string.h> 3 #define N 10 4 typedef struct { 5 char isbn[20]; // isbn号 6 char name[80]; // 书名 7 char author[80]; // ......

实验6

1.实验任务4 1 #include <iostream> 2 #include <stdexcept> 3 4 template <typename T> 5 class Vector { 6 private: 7 T* data; 8 size_t size; 9 public: 10 Vect ......

实验6 模板类、文件I/O和异常处理

实验任务4 Vector.hpp #pragma once #include <iostream> #include <stdexcept>#include <string> using namespace std; template <typename T> class Vector { publ ......
模板 文件

实验6_C语言结构体、枚举应用编程

task4.c #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 ......
语言 结构

实验六

task4: 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 double sal ......

实验六

......

实验6 模板类、文件I/O和异常处理

Task4: vector.hpp: #include<iostream> #include<string> #include<stdexcept> using namespace std; template <typename T> class Vector { private: T* data; ......
模板 文件

实验7

实验任务4:\ #include <stdio.h> int main() { int i=0; char s; FILE *fp; fp=fopen("data4.txt","r"); while(1){ s=fgetc(fp); if(s==EOF){ break; } else if(s==' ......

实验六

任务四 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 double sales_ ......

实验六

实验代码 实验任务4 .hpp #include<iostream>#include<stdexcept>#include <cassert>using namespace std;template<typename T>class Vector{private: T* ptr; int size; ......