C++中Vscode中使用extern出錯處理

1建立了兩個cpp文件 第一個代碼以下,第一個名字叫a.cpp,定義了兩個全局變量。ios #include<cstdio> int a1=9,a2=3; 第二個代碼叫b.cpp,用到了extern,目的是輸出a.cpp的兩個全局變量a1和a2web #include<cstdio> #include<iostream> using namespace std; extern int a1,a2
相關文章
相關標籤/搜索