Reused scope example written
This commit is contained in:
parent
cf0dd37025
commit
56ffdf902c
2 changed files with 20 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
2024-06-30 hwpplayer1 <hwpplayer1@debian>
|
2024-06-30 hwpplayer1 <hwpplayer1@debian>
|
||||||
|
|
||||||
|
* src/reused_scope.cpp: reused scope example writtenx
|
||||||
|
|
||||||
* src/scope_example.cpp: scope example sum of 1 to 10 inclusive is explained
|
* src/scope_example.cpp: scope example sum of 1 to 10 inclusive is explained
|
||||||
|
|
||||||
* src/if_statement.cpp: if statement explained/code written
|
* src/if_statement.cpp: if statement explained/code written
|
||||||
|
|
18
src/reused_scope.cpp
Normal file
18
src/reused_scope.cpp
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
int reused = 42;
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int unique = 0;
|
||||||
|
|
||||||
|
std::cout << reused << " " << unique << std::endl;
|
||||||
|
|
||||||
|
int reused = 0;
|
||||||
|
|
||||||
|
std::cout << reused << " " << unique << std::endl;
|
||||||
|
|
||||||
|
std::cout << ::reused << " " << unique << std::endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue