摘要: include <iostream.h>非标准输入输出流 include 标准输入输出流 C++中为了避免名字定义冲突,特别引入了“名字空间的定义”,即namespace。 当代码中用<iostream.h>时,输出可直接引用cout<<x; //<iostream.h>继承C语言的标准库文件,未引 阅读全文
posted @ 2023-03-16 20:45 Xuuio 阅读(85) 评论(0) 推荐(0)
摘要: 类的组合 示例代码 ` include include using namespace std; class Point{ private: int x,y; public: Point(int px,int py) { x=px; y=py; cout<<"Point constructor ca 阅读全文
posted @ 2023-03-15 22:43 Xuuio 阅读(60) 评论(1) 推荐(1)