Skip to content

Commit a56a4f9

Browse files
committed
fix(exercise03): 声明需要 static,定义不需要
Signed-off-by: YdrMaster <[email protected]>
1 parent 9063083 commit a56a4f9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

exercises/03_argument&parameter/main.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// READ: <https://stackoverflow.com/questions/156767/whats-the-difference-between-an-argument-and-a-parameter>
2-
// TODO: 为下列 ASSERT 填写正确的值
32

43
#include "../exercise.h"
54

6-
void func(int);
5+
static void func(int);
76

7+
// TODO: 为下列 ASSERT 填写正确的值
88
int main(int argc, char **argv) {
99
auto arg = 99;
1010
ASSERT(arg == ?, "arg should be ?");
@@ -15,7 +15,8 @@ int main(int argc, char **argv) {
1515
return 0;
1616
}
1717

18-
static void func(int param) {
18+
// TODO: 为下列 ASSERT 填写正确的值
19+
void func(int param) {
1920
ASSERT(param == ?, "param should be ?");
2021
std::cout << "befor add: " << param << std::endl;
2122
param += 1;

0 commit comments

Comments
 (0)