Where do .cpp and .h files go?

I found a library, timeObj, that works just fine when I put the .cpp and .h files in my sketch directory. But I want to use the library in other sketches. So, I create a folder in Documents\Arduino\libraries\timeObj and copy timeObj.h and timeObj.cpp to that folder.

Documents\Arduino\libraries\timeObj
..timeObj.h
..timeObj.cpp

I then start the IDE and compile the sketch. But the IDE can't find the library.

I have installed other libraries this way- what is wrong here?

---- EDIT ----
Whoops, never mind. Wrong folder.
I put the .h and .cpp files into: C:\Users\steve\Documents\Arduino\libraries\timeObj
and it works as expected.

I don't know why I have two arduino\libraries folders, or even two Arduino IDE's, but this is the one that works.

If you usr the library manager and install LC_baseTools, timeObj would be installed and everything could use it.

-jim lee

Also bear in mind that the #include statement has 2 forms:

#include “lib.h” // local to sketch folder
#include <lib.h> // other

If the compiler output is set to “verbose”, you can see which version of the code is in use. Change this in preferences.