这段代码中cuberotateRIGHT CLOCKWISE;中报错Error RIGHT was not declared in this scope;应该怎么改#include iostream#include vector#include stringusing namespace std; 定义魔方的颜色enum Color RED BLUE GREEN WHITE YELLOW ORA
在代码中,cube.rotate()函数的第一个参数是Color类型的face,但是在调用函数时传入了RIGHT,RIGHT并没有在Color枚举类型中声明,因此会报错。应该将RIGHT改为需要旋转的面的颜色,例如将cube.rotate(RIGHT, CLOCKWISE)改为cube.rotate(RED, CLOCKWISE)。
原文地址: https://www.cveoy.top/t/topic/b1ob 著作权归作者所有。请勿转载和采集!