这段代码中cuberotateRIGHT CLOCKWISE;中报错Error RIGHT was not declared in this scope;应该改成enum Color RED BLUE GREEN WHITE YELLOW ORANGE ;中的哪一个#include iostream#include vector#include stringusing namespace std
这段代码中cube.rotate(RIGHT, CLOCKWISE);中报错Error 'RIGHT' was not declared in this scope;,应该改成enum Color { RED, BLUE, GREEN, WHITE, YELLOW, ORANGE };中的哪一个都不对,因为RIGHT并没有在枚举类型中定义。需要在枚举类型中加入RIGHT,例如:
enum Color { RED, BLUE, GREEN, WHITE, YELLOW, ORANGE, RIGHT };
原文地址: https://www.cveoy.top/t/topic/b1ov 著作权归作者所有。请勿转载和采集!