bonjour tous


je travaille sur une code simple qui permet de faire entrer un mot , mais cela avec graphics.h , mon but est deplace le curseur la ou je veux en utlisant gotoxy(), mais ca ne marche pas .
mon code et ceci


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <alloc.h>
 
 
 
 void entrer();
 
int main(void)
{
   int gdriver=DETECT, gmode, errorcode;
 
 
 
   initgraph(&gdriver, &gmode, "c:\\borlandc\\bgi");
   errorcode = graphresult(); /* check for any errors */
   if (errorcode != grOk)
   {
      printf("Graphics error: %s\n", grapherrormsg(errorcode));
      printf("Press any key to halt:");
      getch();
      exit(1);
   }
   line(480,40,480,420);
 
line(560,40,560,420);
 
line(480,420,560,420);
gotoxy(120,560);entrer();//appeller la foction entrer
closegraph();
return 0;
}
 
 
 
void entrer()
{
 
char *t[2];
int i;
line(480,40,480,420);
 
line(560,40,560,420);
 
line(480,420,560,420);
 
for(i=0;i<2;i++)
{
 
 t[i]=(char*)malloc(sizeof(char)*100);
 outtextxy(20,160,"PHRASE : ");
gotoxy(122,655); scanf("%s",t[i]);//la meme chose pour gets ,malheuresemnt                     
ca ne marche pas
 printf("%s",t[i]);
 
}
for(i=0;i<2;i++)
{
  gotoxy(120,32);
  printf("PHRASE : %s\n",t[i]);
}
  getch();
 
 
}

merci