Графика в консоли (Dev C++) - C (СИ)
Формулировка задачи:
помогите разобраться.
примерно такая программа выдает вот такую ошибку,хотя на борланде запускалась.
ошибка: [Warning] deprecated conversion from string constant to 'char*'
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <fstream>
#include <iostream>
#include <string.h>
int main()
{
float x,y;
printf("x,y>");
scanf("%f%f",&x,&y);
int gdriver = DETECT, gmode, errorcode;
initgraph(&gdriver, &gmode,NULL);
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* return with error code */
}
setfillstyle(SOLID_FILL,GREEN),
bar(0,0,640,480);
setcolor(YELLOW);
line(30,240,610,240);outtextxy(615,250,"x");
line(320,30,320,450);outtextxy(325,20,"y");
line(220,235,220,245);outtextxy(230,250,"-1");
line(120,235,120,245);outtextxy(130,250,"-2");
line(420,235,420,245);outtextxy(430,250,"1");
line(520,235,520,245);outtextxy(530,250,"2");
line(315,140,325,140);outtextxy(330,145,"1");
line(315,40,325,40);outtextxy(330,45,"2");
line(320,340,320,140);outtextxy(320,340,"-1");
line(320,440,320,140);outtextxy(320,440,"-2");
line(320,140,420,240);
line(320,140,420,140);
line(420,240,420,140);
setfillstyle(SOLID_FILL,RED);
floodfill(415,145,YELLOW);
setcolor(WHITE);
getch();
closegraph();
return 0;
}Решение задачи: «Графика в консоли (Dev C++)»
textual
Листинг программы
outtextxy(615,250,"x");