local j example test code from the book C++ Primer C++ 11
This commit is contained in:
parent
56ffdf902c
commit
33d57b7474
2 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2024-07-01 hwpplayer1 <hwpplayer1@debian>
|
||||
|
||||
* src/local_j.cpp: local j value test code
|
||||
|
||||
2024-06-30 hwpplayer1 <hwpplayer1@debian>
|
||||
|
||||
* src/reused_scope.cpp: reused scope example writtenx
|
||||
|
|
15
src/local_j.cpp
Normal file
15
src/local_j.cpp
Normal file
|
@ -0,0 +1,15 @@
|
|||
#include <iostream>
|
||||
|
||||
int i = 42;
|
||||
|
||||
int main()
|
||||
{
|
||||
int i = 100;
|
||||
std::cout << "int i local i is "
|
||||
<< i << std::endl;
|
||||
int j = i;
|
||||
std::cout << "int j local j is "
|
||||
<< i << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue