问题描述
- EGE新手,为什么那就Hello world 没有输出在控制台,我用的是codeblocks
-
EGE新手,为什么那就Hello world 没有输出在控制台,我用的是codeblocks
#include
#include
#include
using namespace std;
int main()
{
initgraph(640, 480);cout<<"hello world "<<endl; setfillcolor(EGERGB(0xFF, 0x0, 0x80)); line(100, 100, 500, 200); line(500, 200, 200, 200); line(200, 200, 100, 100); getch(); closegraph(); return 0;
}
解决方案
因为你将屏幕设置为绘图模式了,此时之前输出的文字就看不到了。
解决方案二:
outtextxy(0,0,"Hello world!" );
也不知道对不对
时间: 2024-08-31 23:12:51