📄 scoperes.cpp
字号:
//: C03:Scoperes.cpp
// From Thinking in C++, 2nd Edition
// at http://www.BruceEckel.com
// (c) Bruce Eckel 1999
// Copyright notice in Copyright.txt
// Defining a non-inline member function
#include <iostream>
using namespace std;
class Example {
int i, j, k;
public:
Example(); // Declare the function
void print(); // Ditto
};
Example::Example() { // The constructor
i = 12;
j = 100;
k = 47;
}
void Example::print() {
cout << "i = " << i;
cout << ", j = " << j;
cout << ", k = " << k << endl;
}
int main() {
Example test;
test.print();
} ///:~
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -