local j example test code from the book C++ Primer C++ 11

This commit is contained in:
Mert Gör 🇹🇷 2024-07-01 15:23:51 +03:00
parent 56ffdf902c
commit 33d57b7474
Signed by: hwpplayer1
GPG Key ID: 03E547D043AB6C8F
2 changed files with 19 additions and 0 deletions

View File

@ -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
View 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;
}