摘要:
#include using namespace std; int main() { ios_base::fmtflags original_flags=cout.flags(); cout using namespace std; int main() { ofstream out("test1.txt"); out #include #include usi... 阅读全文
摘要:
实验四 Graph 1.类Graph的声明 #ifndef GRAPH_H #define GRAPH_H // 类Graph的声明 class Graph { public: Graph(char ch, int n); // 带有参数的构造函数 void draw(); // 绘制图形 priv 阅读全文
摘要:
在我的理解中类是实现一个目标的整体,在这个整体里有实现这个目标完整的函数,这样在实现目标时就只要调用类里面的函数就可以了。类需要定义和实现,也可以在定义的时候直接实现。 对象就是类的实现目标,可以用类的名字去定义一个对象,然后通过调用类里面的函数就可以实现对象要达成的目标。 构构造函数就相当于对某个 阅读全文
摘要:
#include<iostream>using namespace std;int main() {cout << "Menu: A(dd) D(elete) S(ort) Q(uit),Select one:" << endl;while (true){char c;cin >> c;if (c 阅读全文