C++ vector of objects vs. vector of pointers to objects

前端 未结 6 568
礼貌的吻别
礼貌的吻别 2020-12-07 12:00

I am writing an application using openFrameworks, but my question is not specific to just oF; rather, it is a general question about C++ vectors in general.

I wanted

6条回答
  •  春和景丽
    2020-12-07 12:21

    The main idea of using vector is to store objects in a continue space, when using pointer or smart pointer that won't happen

提交回复
热议问题