摘要:
#include using std::string;templateclass test{private:T1 a;T2 b;public://virtual int getNumber(char c)=0;test(T1 x, T2 y) //构造函数{a=x;b=y;}~test() {cout obj(5,10);obj.print();test obj2(5.2,10);obj2.print();test obj2(5.2,10);obj2.print();} 阅读全文
摘要:
////上一个版本是基于连接的实现,今天改了一个基于数据报的实现#include #include #include #include #include #include#include#include#include #include#include #include #include #include #include #include #include #define FIFO_NAME "/home/907684/my_fifo_file"//#define BUFFER_SIZE PIPE_BUF#define BUFFER_SIZE 10#define TEN_ 阅读全文