We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Tag: hidden

Be careful with hidden cost of std::vector for user defined objects

output_1

While creating and using std::vector with user defined classes we needs some special care otherwise it can hamper the performance of our application. [showads ad=inside_post] Let’s learn by example, Suppose we have an Item Class, Advertisements class Item { public: static int m_ConstructorCalledCount; static int m_DestCalledCount; static int m_CopyConstructorCalledCount; Item() { m_ConstructorCalledCount++; } ~Item() { …

Be careful with hidden cost of std::vector for user defined objectsRead More

Cart

Your Cart is Empty

Back To Shop