I declared a function in the main.hpp file, after giving the #pragma once instruction. Then in main.cpp file I did #include “main.hpp” and I called the function in main. An error was detected: use of undeclared identifier.
I checked to see if by chance I had misspelled the name of the function, but it is correct.
New contributor
Ettore Franzè is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1