I am working on a class project using vectors and linked lists. But in C++ in order to apply them I need to have the following code in my header.
#include<list>
#include<vector>
I know that both of these are a part of the standard template library. So I'd like to do a single
#include<StandardTemplateLibrary>
to save lines. But everywhere I look I don't see a singular command to add to my code and I've tried cstdlib, stdlib, cstdlib.h and none of them contain the keywords I need.
Is there a singular preprocessor that I can add to my project to do both of these? Or do I just have to include both? If you can refer me to source to read as well that'd be greatly appreciated.
On some compilers, including <bits/stdc++.h>
might do what you're looking for.
Note however that it makes your code nonportable (it may not work on other compilers, or even different versions of the same compiler). This is ok in some cases.
More info about why doing this might not be a good idea: Why should I not #include <bits/stdc++.h>
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With