#include <graphics.h>
#include <conio.h>
void main()
{
initgraph(640,480);
char a,b;
a='o';
b='k';
outtextxy(1,1,a);
if(?=='o')//需要怎么判断(1,1)这个位置的字符就是‘o’
outtextxy(2,2,b);
getch();
closegraph();
}
#include <graphics.h>
#include <conio.h>
void main()
{
initgraph(640,480);
char a,b;
a='o';
b='k';
outtextxy(1,1,a);
if(?=='o')//需要怎么判断(1,1)这个位置的字符就是‘o’
outtextxy(2,2,b);
getch();
closegraph();
}
或者使用一个二维数组 char array[...][...]
记录下所有的 outtextxy(x,y, ) 输出的值
然后使用
if(array[1][1] == 'o')
判断是不是 'o'