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;
}
要是要在普通控制台(黑色的)显示,可以这样:
#include
#define SHOW_CONSOLE
int main(){......}
因为你将屏幕设置为绘图模式了,此时之前输出的文字就看不到了。
outtextxy(0,0,"Hello world!" );
也不知道对不对