so the entirety of the #include files has to be in the same file? |
I am not sure what you mean. You have three files. One is the original .cpp file, and you ought to have created to new files, Cat.h and Cat.cpp. These two new files should be in the same directory as the original .cpp file.
To be honest, I would have expected you to place the two new files in the same directory as the original file. I mean, why would you put them elsewhere?
there is absolutely no function or method that can retrieve its URL for you? |
Again, I am not sure what you mean by this either. The include file rules say that if the header is included with "" (as in
#include "Cat.h"
), the compiler will look in the same directory as the source file, and if it doesn't find it, down the include path. If it's included with <> (as in
#include <Cat.h>
), the compiler will
not look in the same directory as the source file, but down the include path.
Typically, libraries are specified with <> (as in
#include <iostream>
) and "" for local project files.