Where are the headers of the C++ standard library

前端 未结 6 732
暖寄归人
暖寄归人 2021-02-01 02:58

I wonder where on my file system I find the headers of the C++ Standard library. In particular I am looking for the definition of the vector template. I searched in /usr/inclu

6条回答
  •  星月不相逢
    2021-02-01 03:45

    GCC typically has the standard C++ headers installed in /usr/include/c++//. You can run gcc -v to find out which version you have installed.

    At least in my version, there is no vector.h; the public header is just vector (with no extension), and most of the implementation is in bits/stl_vector.h.

    That's the case on my Ubuntu distribution; your distribution may differ.

提交回复
热议问题