english
This commit is contained in:
1
english/basic_content/const/extern_const/const_file1.cpp
Normal file
1
english/basic_content/const/extern_const/const_file1.cpp
Normal file
@@ -0,0 +1 @@
|
||||
extern const int ext=12;
|
11
english/basic_content/const/extern_const/const_file2.cpp
Normal file
11
english/basic_content/const/extern_const/const_file2.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include<iostream>
|
||||
/**
|
||||
* by 光城
|
||||
* compile: g++ -o file const_file2.cpp const_file1.cpp
|
||||
* execute: ./file
|
||||
*/
|
||||
extern const int ext;
|
||||
int main(){
|
||||
|
||||
std::cout<<ext<<std::endl;
|
||||
}
|
1
english/basic_content/const/extern_const/file1.cpp
Normal file
1
english/basic_content/const/extern_const/file1.cpp
Normal file
@@ -0,0 +1 @@
|
||||
int ext;
|
11
english/basic_content/const/extern_const/file2.cpp
Normal file
11
english/basic_content/const/extern_const/file2.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include<iostream>
|
||||
/**
|
||||
* by 光城
|
||||
* compile: g++ -o file file2.cpp file1.cpp
|
||||
* execute: ./file
|
||||
*/
|
||||
extern int ext;
|
||||
int main(){
|
||||
|
||||
std::cout<<(ext+10)<<std::endl;
|
||||
}
|
Reference in New Issue
Block a user