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 »

git diff

A simple graphic makes this clearer: git diff Shows the changes between the working directory and the index. This shows what has been changed, but is not staged for a… Read more »