use size_t instead of unsigned int

changed unsigned int to size_t for better C++ STL conformance.