why do i need to include to use them?

后端 未结 4 1957
迷失自我
迷失自我 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:48

    You need to include the header file, to use any type of data/function. All the data types and functions in c++ are included in their own libraries.If you dont include the library, the c++ program won't know what you used, because it doesnt know they even excist.Its like :

    You want to play with Jim's dog, but you dont know who Jim is, or what a dog is.

提交回复
热议问题