So it means that the function is called from outside the name.cpp and name.hpp files? So make it so it is called in the translation unit do I just use the scope operator?
Like Duoas says, a translation unit is a bunch of text that the compiler gets once all the lines beginning with the hash # are processed by the preprocessor.
Each "source file" and any files that it #includes (and any files that those included files #include) form a translation unit.
If a function isn't used in a translation unit then you haven't called it in that bunch of code. The scope operator is only used if the function is in a local scope.
The compiler only knows how to handle ONE SINGLE FILE at a time. It does not understand or know anything about functions declared elsewhere except for what you tell it.
The #include stuff just copies the stuff in "stdio.h" (from wherever the compiler keeps the "stdio.h" file) and pastes it verbatim into your .c file. The .h file tells the compiler what stuff exists elsewhere.
You could do the same yourself:
1 2 3 4 5 6 7
int puts( constchar* ); // prototype for puts(), which is declared elsewhere
int main()
{
puts( "Hello world!" );
return 0;
}
The .h files just save us a lot of typing: instead of a gazillion lines of code telling us about stuff found elsewhere for every single .c or .cpp file we wish to compile, we can just #include that information in a single line.