This program is to count how many time a password appear in few passwordlist. The better options to do this is use script or bash shell,not c++.I use c++ for learning purpose.
see my blog for detail:http://dianran.org/archive/chinese-weak-passwords-7.html