I am reading the book "C++ WITHOUT FEAR" by "BRIAN OVERLAND". I am in the fourth chapter, which is on functions. According to the last chapter in the book, my last code example as a local function.
using namespace std;
// Function must be declared before being used.
int prime(int n);
But now this chapter is telling me about global functions. Which states that it is global when it is declared before main(). But the code above was a local function according to the book. This code block was written before we got to the introduction of global functions. I would love some help here, and thanks.