1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

Update why-there-only-value-passing-in-java.md

bad c++ code here
incr(*age)  -->
incr(age);
This commit is contained in:
caihj 2023-05-10 13:44:56 +08:00 committed by GitHub
parent 8b2241ba35
commit 557935770f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,7 @@ int main()
{
int age = 10;
std::cout << "invoke before: " << age << "\n";
incr(*age);
incr(age);
std::cout << "invoke after: " << age << "\n";
}
```