⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 copyassign.cpp

📁 压缩包里有教材<<C++模式设计-基于QT4开源跨平台开发框架>>所有源码
💻 CPP
字号:
#include <iostream>#include "fraction.h"int main() {    using namespace std;    Fraction twothirds(2,3); /* using 2-arg constructor */    Fraction threequarters(3,4);     Fraction acopy(twothirds);   /* using copy constructor */    Fraction f4 = threequarters; /* also using copy constructor */    cout << "after declarations" ;    Fraction::report();    f4 = twothirds;              /* assignment */    cout << "before    multiply" ;    Fraction::report();    f4 = twothirds.multiply(threequarters); /* Lots of       objects get created here. */    cout << "after     multiply" ;    Fraction::report();    return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -