次の 3 つのファイル (1 つの *.cpp と 2 つの *.hpp) があります。
メイン プログラム ファイル:
// test.cpp
#include<iostream>
#include"first_func.hpp"
#include"sec_func.hpp"
int main()
{
double x;
x = 2.3;
std::cout << sec_func(x) << std::endl;
}
- first_func.hpp ヘッダー:
// first_func.hpp
...
double first_func(double x, y, x)
{
return x + y + x;
}
- sec_func.hpp ヘッダー:
// sec_func.hpp
...
double sec_func(double x)
{
double a, b, c;
a = 3.4;
b = 3.3;
c = 2.5;
return first_func(a,b,c) + x;
}
sec_func.hpp ファイル内から first_func を正しく呼び出すにはどうすればよいですか?