Error message: name lookup of ‘jj’ changed for ISO ‘for’ scoping, (if you use ‘-fpermissive’ G++ will accept your code)

前端 未结 4 1145
谎友^
谎友^ 2021-01-02 10:28

The error is:

In function ‘int returnShortestWeightedBranch(std::vector >*)’:
error: name lookup of ‘jj’ changed for         


        
4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-02 10:57

    for (int jj = 0; jj < routeVector[i].selectedBranchesVector.size(); jj++);
    

    This line ends with a semicolon! It shouldn't :)

提交回复
热议问题