C Calling a function from the header file in the main. Ask Question 2. 2. I'm writing an integral calculator. I'm trying to get the main. cpp file to read in the functions from the functions class which is in the functions. h. cpp files. though nothing should be wrong with that as it works when the function definition is included in the main