Skip to content

Commit

Permalink
fix(exercise03): 声明需要 static,定义不需要
Browse files Browse the repository at this point in the history
Signed-off-by: YdrMaster <[email protected]>
  • Loading branch information
YdrMaster committed Jul 11, 2024
1 parent 9063083 commit a56a4f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions exercises/03_argument&parameter/main.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// READ: <https://stackoverflow.com/questions/156767/whats-the-difference-between-an-argument-and-a-parameter>
// TODO: 为下列 ASSERT 填写正确的值

#include "../exercise.h"

void func(int);
static void func(int);

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

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

0 comments on commit a56a4f9

Please sign in to comment.