//f1.h #ifndef F1_H_ #define F1_H_ int arr(int n); #endif
//f1.cpp #include <iostream> #include "f1.h" int arr(int n){ return n * n; }
//main.cpp #include <iostream> #include "f1.h" int main(){ int a = 5; int b = arr(a); std::cout << b << std::endl; return 0; }