📄 5_8.cpp
字号:
//5_8.cpp
#include <iostream>
using namespace std;
class Exam
{
public:
Exam() {cout<<"Calling Constructor"<<endl;}
};
void fun(int i)
{
static Exam e;
cout<<"The i is :"<<i<<endl;
}
int main()
{
fun(10);
fun(20);
fun(30);
return 0;
}
/*
程序运行结果为:
Calling Constructor
The i is :10
The i is :20
The i is :30
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -