📄 第12章12debugging11.cpp
字号:
// Chapter 12 of C++ How to Program
// Debugging problem (debug.cpp)
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
#include "arithmetic.h"
template< class T >
void printResult( T num )
{
cout << "The result of the operation is: "
<< num << endl;
}
int main() {
Arithmetic < int > a( 5, 3 );
Arithmetic< int > b( 7, 5 );
cout << "Arithmetic performed on variable a:\n";
printResult( a.add() );
printResult( a.sub() );
printResult( a.mult() );
printResult( a.div() );
cout << "\nArithmetic performed on variable b:\n";
printResult( b.add() );
printResult( b.sub() );
printResult( b.mult() );
printResult( b.div() );
system("PAUSE");
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -