uint is not standard C++, please use size_t instead.