Category Archives: C++

Kinh nghiệm về C++

static variable c++

All static member is shared by all objects. All static data is initialized to zero, if no other initialization present . You must definition out side class to use static… Read more »


MISRA is set of software development guidelines for the C and C++ programming language developed by MISRA.Its aims are to facilitate code safe, security, portability and reliablity in context of… Read more »

vector vs list

vector: Contiguous memory. Pre-allocates space for future elements, so extra space required beyond what’s necessary for the elements themselves. Each element only requires the space for the element type itself… Read more »

how to know string is empty

KhÔng thể so sánh string vói null được vì nó luôn được initialize. No không bao giờ là NULL Hãy sử dụng s.size() == 0 or s.empty() để check empty… Read more »

colon after constructor

As others have said, it’s an initialisation list. You can use it for two things: Calling base class constructors Initialising member variables before the body of the constructor executes. For… Read more »