The difference is <somefile.h> is a file whose location is known by the compiler. "somefile.h" is a local file to the directory you're compiling in, which you probably wrote. <somefile> is a variant of <somefile.h>.
The purpose of including a library in your *.cpp file is so you can re-use the functions of the library. Include libraries in the files you write that they directly apply to. In other words, unless you have code in your *.h file that uses functions in that library, you should include it in the *.cpp. Generally the declarations of functions are put in header files (.h), and they are defined in a separate .cpp file that includes that file and all necessary libraries.
That said, if you include the library in your .h file, and you include the .h file in your .cpp file, the .cpp with have the library's functions. The problem with that is the compiler will flip if you have two functions with the same name and argument types, which can happen if it goes over the same file more than once (i.e. you have nested files that include it). But then again, you can avoid that by organising your header files like so:
1 2 3 4
|
#ifndef HEADERFILENAMEINCAPS_H
#define HEADERFILENAMEINCAPS_H
/* all of your usual code */
#endif
|
That's a preprocessor directive that checks if a constant hasn't been defined. If not, the compiler continues. You then define that constant so that if the compiler attempts to compile it again, it skips the code, and doesn't have multiples of functions. The constant doesn't need a value. It's common practice to use the name of the file as the constant's name, and as a constant it is generally capitalised.