I looked at sample header files, but I could only find simple ones that didn't contain anything.
So my question is: where am I #includestuff like stringand vector? In a .h or .cpp file? Or maybe in both?
#include
string
vector
Everywhere.
If you need something declared in the header file, include them in the .h file. Otherwise, just in the .cpp file.
, .h - , .h , . #include. , , , .
, , , , .h, , , . , ( .cpp .h). , .
: " - , ", , .
# , ? .h .cpp?
, (.. , ).
:
, ( std::string API, string ++)
, (.. "" - .h, .h, ).
. , ++, std boost , () , , std.
, std- / API ( ). std, (), , , include . , std cpp.