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

前端 未结 4 1198
谎友^
谎友^ 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:56

    False: for(...;...;...;);

    True: for(...;...;...;)

    You shouldn't use a semicolon, ;

提交回复
热议问题