page contents

EasyX中switch (getlinestyle())表达式必须包含整数或枚举类型

Rex 发布于 2021-07-03 10:05
阅读 568
收藏 0
分类:C/C++开发

这个函数可以通过

void changetextcolor()

{

switch (gettextcolor()){

case WHITE:settextcolor(RED); break;

case RED:settextcolor(LIGHTRED);

case LIGHTRED:settextcolor(YELLOW); break;

case YELLOW:settextcolor(GREEN); break;

case GREEN:settextcolor(CYAN); break;

case CYAN:settextcolor(BLUE); break;

case BLUE:settextcolor(MAGENTA); break;

case MAGENTA:settextcolor(WHITE); break;

default:settextcolor(WHITE); break;

}

}

这个函数提示错误

void changelinestyle(){

switch (getlinestyle())

{

case PS_SOLID:

default:

break;

}

}


哪位大神给详细讲讲