Java packages vs. C++ libraries

后端 未结 6 1809
死守一世寂寞
死守一世寂寞 2021-01-18 08:52

In Java, there is what is called package. Does library in C++ represent the same meaning, especially in terms for example

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-18 09:13

    The closest to Java packages are namespaces in C++.

    They can be nested into one another, and you need to specifically declare that you are using them or a part of their contents. However, they do not enforce any physical file hierarchy like Java packages do.

提交回复
热议问题