dimanche 27 juin 2021

repeated error sstream: No such file or directory

From this tutorial site, I ran this code below as .c file,

#include<graphics.h>
#include<stdio.h>
#include<conio.h>

void main(void) {
    int gdriver = DETECT, gmode;
    int x1 = 200, y1 = 200;
    int x2 = 300, y2 = 300;
    clrscr();

    initgraph(&gdriver, &gmode, "c:\\turboc3\\bgi");
    line(x1, y1, x2, y2);
    getch();
    closegraph();
}

Unfortunately, I got this error

[Error] sstream: No such file or directory

From this site, I saved the code in .cpp file and I ran it successfully without any error. However, no graphic drawing shows, its only the command prompt that appears. This link did not work either. Please, is there any workaround to make it work.

Note: I use TDM-GCC 4.9.2 64-bit Release

Aucun commentaire:

Enregistrer un commentaire