mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-29 13:23:09 +08:00
fix(docs/cpp): fix error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
This commit is contained in:
@ -48,8 +48,8 @@ int main() {
|
||||
PrintUtil::printVector(list);
|
||||
|
||||
/* 通过索引遍历列表 */
|
||||
int count = 0;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
size_t count = 0;
|
||||
for (size_t i = 0; i < list.size(); i++) {
|
||||
count++;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user