随笔分类 - 面向对象程序设计作业
实验五 模板类与多态
摘要:实验任务二 task2.cpp #include <iostream> #include <fstream> #include <vector> #include "Person.hpp" int main() { using namespace std; vector<Person> phone_
实验四 继承
摘要:实验任务三 car.hpp #ifndef car_hpp #define car_hpp #include <iostream> #include <iomanip> #include <string> using namespace std; class Car { private: strin
实验三 类和对象Ⅱ
摘要:实验任务4 Vector_int.cpp源码 #ifndef VECTOR_INT_HPP #define VECTOR_INT_HPP #include <iostream> #include <cassert> using std ::cout; using std::endl; // Vect
实验二 数组、指针与C++标准库
摘要:实验任务5 info.hpp文件源码 1 #ifndef INFO_HPP 2 #define INFO_HPP 3 4 //info类的实现 5 #include <iostream> 6 #include <iomanip> 7 #include <string> 8 9 using names
实验一 类与对象
摘要:试验任务3 complex.hpp文件源码 1 #ifndef COMPLEX_HPP 2 #define COMPLEX_HPP 3 4 // complex类的定义 5 #include <iostream> 6 #include <iomanip> 7 #include <cmath> 8 9