I consider myself a C++ beginner and have come to a question when dreading the fact of using many include directives. So instead of figuring it out myself the long way, I have come to get some help before I can learn and practice more.
From the book Absolute C++ 5th edition by Walter Savitch, says that "The operator sizeof is part of the core C++ Language and requires no include directive or using directive." 12.4 Random Access to Files, page 585
I want to know where can I find other operators or codes that does not use the include directive or using directive.
This could help me build programs before I can start learning more of the C++ Libraries.
Thank you!
What you are asking about can all be answered by going on cppreference. Basically there are many default libraries that can be included by writing
#include <lib>
. So for example you want to use vectors (well optimized dynamic array), you write#include <vector>
, if you want to handle input and output you write#include <iostream>
, etc.All of this can be found documented on page I've linked above. If you don't know with what to start some basic and most libraries would be iostream, string, vector, map.
Then there is an memory library, which provides for example an unique pointer which is a really strong tool in C++.
Then there is an algorithm library, containing useful functions working with containers over iterators.
These are just examples that came to my mind first and I've used them the most. If you are not sure about anything you can always search on cppreference for full documentation on it.
If you have any other or more specific question feel free to ask.