Advertisement

g++ multiple cpp compilation

阅读量:

回顾g++编译多个文件的方法

auto.h

复制代码
 extern const int eInt;

    
  
    
 int getConstValue();
    
    
    
    

自动控制程序文件

复制代码
 #include "iostream"

    
 #include "typeinfo"
    
 #include "math.h"
    
 #include "auto.h"
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
 const int eInt = 920;
    
  
    
  
    
 int iInit = 79;
    
 int getSize(){
    
 	return iInit;
    
 }
    
  
    
 const int mSize = getSize();
    
  
    
 int main(){
    
  
    
 	char h = 'e';
    
 	int a = 10;
    
 	auto b = a;
    
 	auto c = std::string("you are right");
    
 	std::string 

全部评论 (0)

还没有任何评论哟~