local j example test code from the book C++ Primer C++ 11
This commit is contained in:
		@@ -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;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user