Me sale [Error] ld returned 1 exit status
Publicado por Me llamo (1 intervención) el 19/10/2019 00:07:15
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
#include <conio.h>
#include <stdio.h>
#include <windows.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
void gotoxy(int x, int y)
{
HANDLE hnave;
hnave = GetStdHandle(STD_OUTPUT_HANDLE);
COORD dwPos;
dwPos.X = x;
dwPos.Y = y;
SetConsoleCursorPosition(hnave, dwPos);
}
int main(){
gotoxy(15,10); printf("*");
int x = 10,y = 10;
bool GameOver = false;
while(!GameOver){
gotoxy(x,y); printf("*");
if(kbhit()
{
char tecla = getch();
gotoxy(x,y); printf(" ");
if(tecla == 'j') x--;
if(tecla == 'l') x++;
if(tecla == 'i') y--;
if(tecla == 'k') y++;
}
}
return 0;
}
Valora esta pregunta
0