I think the issue was by ths following , Compilation fails, because you have only declared this function. Its definition is in different compilation unit, and you're not linking those two together. Do g++ -Wall -o quartile quartile.cpp stats.cpp and it'll work.
Can't solve error with file including header that includes itself using header guards
Does that help Because this source file is included after other library headers. Try moving it to the top and you'll get a compiler error. That's what #include does - it simply copies the header file contents and pastes it to the #include location.