新手提问~~~求回答
之前还真没有编过在工程里面加多个文件这种的程序。。。那个,这个跟书上一样的程序为什么编译不通过啊
2015-10-06 16:34
2015-10-06 17:07
2015-10-06 17:44
程序代码://f1.h #ifndef F1_H_ #define F1_H_ int arr(int n); #endif
2015-10-06 19:40
程序代码://f1.cpp
#include <iostream>
#include "f1.h"
int arr(int n){
return n * n;
}
2015-10-06 19:40
程序代码://main.cpp
#include <iostream>
#include "f1.h"
int main(){
int a = 5;
int b = arr(a);
std::cout << b << std::endl;
return 0;
}
2015-10-06 19:40
2015-10-06 19:44
2015-10-06 20:59
2016-10-14 11:46