In a program using memset of vector is initialized, and then get the wrong results. Find the bug took a long time.
vector has its own structure, not simply the byte initialized. Use memset to initialize the vector, it will destroy the structure of the vector, resulting in a data error vector. I use memset all the elements in the vector is set to 1, the final findings far.