C++编程实例(c++封装链表、栈、队列).docVIP

  • 10
  • 0
  • 约1.13万字
  • 约 19页
  • 2019-06-03 发布于江西
  • 举报
二元方程封装(C++) //封装 #ifndef _CBIEQUTION_H #define _CBIEQUTION_H #include cmath #include iostream using namespace std; typedef struct _x1x2 { float x1; float x2; }X1X2; class CBiEqution { private: int _a; int _b; int _c; inline int getBB4AC()const { return _b*_b-4*_a*_c; } public: CBiEqution(int a=1,int b=2,int c=1); CBiEqution operator+(const CBiEqution equ); CBiEqution operator-(const CBiEqution equ); friend bool operator==(const CBiEqution equ1,const CBiEqution equ2); friend istream operator(istream is,CBiEqution equ); friend ostream operator(ostream os,CBiEqution equ); X1X

文档评论(0)

1亿VIP精品文档

相关文档