摘要:1 合并文件,添加语句 #include<iostream>#include<fstream>#include<string>#include<cstdlib>using namespace std;int main(){ string filename; cout << "输入打开的文件: "; 阅读全文
实验五
2019-06-03 12:36 by 陈仕成, 188 阅读, 0 推荐, 收藏,
摘要:1 main.cpp #include <iostream>#include <string>using namespace std;#include "MachinePets.h"#include "PetCats.h"#include "PetDogs.h"void play(MachinePe 阅读全文
实验四
2019-05-20 14:39 by 陈仕成, 157 阅读, 0 推荐, 收藏,
摘要:(1)第二题 补足部分: arrayInt.h: int & operator[](int a); arrayInt.cpp: int & ArrayInt::operator[](int a){ return p[a];} (2)第一题 1.battery.h #ifndef BATTERY_H# 阅读全文
期中第一题
2019-04-30 15:05 by 陈仕成, 233 阅读, 0 推荐, 收藏,
摘要:#include "date.h" #include "utils.h" #include <iostream> using std::cout; using std::endl; Date::Date() { year=1970; month=1; day=1; } Date::Date(int 阅读全文
C++实验三
2019-04-21 15:45 by 陈仕成, 293 阅读, 0 推荐, 收藏,
摘要:part2 graph.h #ifndef GRAPH_H#define GRAPH_H// 类Graph的声明 class Graph { public: Graph(char ch, int n); // 带有参数的构造函数 void draw(); // 绘制图形 private: char 阅读全文
课堂练习1
2019-04-02 07:28 by 陈仕成, 181 阅读, 0 推荐, 收藏,
摘要:#include<iostream> using namespace std;class Complex{ public: Complex(float r1,float i1); Complex(float r1); void add(Complex c); void show(); private 阅读全文
c++实验二
2019-03-24 10:04 by 陈仕成, 302 阅读, 0 推荐, 收藏,
摘要:(1) #include <iostream>using namespace std;typedef struct{ double real; double imaginary;} Complex; int add(int, int);double add(double, double);Compl 阅读全文
c++实验一
2019-03-17 11:20 by 陈仕成, 294 阅读, 0 推荐, 收藏,
摘要:(1)前两个实验是基础,需注意coout与cin的用法 (2)最后一个实验不太会,请教同学之后大概弄懂了 2-28 (1) #include<iostream>using namespace std;int main(){ char i; while(true) { cout<<"Menu:A(dd 阅读全文
浙公网安备 33010602011771号