这段代码中cuberotateUP CLOCKWISE;报错是为什么#include iostream#include vector#include stringusing namespace std; 定义魔方的颜色enum Color RED BLUE GREEN WHITE YELLOW ORANGE ; 定义魔方的转动方式enum Rotation CLOCKWISE COUNTERC
这段代码中的报错是因为UP和CLOCKWISE没有被定义。UP和CLOCKWISE是枚举类型中的成员,需要在代码中定义它们,或者使用枚举类型的全名来表示它们。例如,可以改为cube.rotate(Color::UP, Rotation::CLOCKWISE)。
原文地址: https://www.cveoy.top/t/topic/b1k6 著作权归作者所有。请勿转载和采集!