why do i need to include to use them?

后端 未结 4 1952
迷失自我
迷失自我 2021-01-12 20:12

I am new to C++ and trying to figure out how to use vector.

More specifically, I want to know when I need to use #include. I

4条回答
  •  醉酒成梦
    2021-01-12 20:46

    When you see code that uses std::vector, but did not #include , that code is broken. Period.

    It may "just so happen" to work on particular compilers/standard library implementations/platforms/planets, depending on which other standard headers "just so happen" to already be including for their own use. This shall not be relied upon.

提交回复
热议问题