这段代码中cuberotateUP CLOCKWISE;报错TError cube was not declared in this scope; did you mean Cube是为什么#include iostream#include vector#include stringusing namespace std; 定义魔方的颜色enum Color RED BLUE GREEN WHI
在ThistlethwaiteSolver的solveTopCross函数中,调用了cube.rotate(UP, CLOCKWISE),但是在函数中并没有声明或定义cube变量,因此编译器认为cube未被声明过,报错提示'cube' was not declared in this scope。可能是漏写了函数参数或成员变量。正确的代码应该是将cube作为函数参数传入。
原文地址: https://www.cveoy.top/t/topic/b1lA 著作权归作者所有。请勿转载和采集!