C ++ compiler for windows 10

1

I am looking for a compiler that supports the clrscr instructions, I have read that the error seems to be in the conio.h library.

I have tried the mingw but it gives me the following error:

  

C: \ tesisv3> gcc sumar2.c   C: \ Users \ Yept \ AppData \ Local \ Temp \ ccb5dlGC.o: sumar2.c :(. Text + 0xe):   undefined reference to 'clrscr' collect2.exe: error: ld returned 1   exit status

the program that I want to compile is this:

#include <stdio.h> 
#include <conio.h>
void main()

{

 int a,b,suma;

 clrscr();

 printf("Dame el primer numero \n");

 scanf("%d",&a);

 printf("Dame el segundo numero \n");

 scanf("%d",&b);

 suma=a+b;

 printf("El resultado de la suma es: %d \n",suma);

 getch();

}

I ran the program in an IDE that I have called Turbo C ++ but I could not use its compiler from the CMD to compile it because it gives me an error which says it can not be executed in 64-bit systems

    
asked by Yept 14.06.2018 в 21:07
source

1 answer

2
  

I'm looking for a compiler that supports clrscr instructions

This function is exclusive of the Turbo C ++ compiler (the same one that you comment on your question), then if you really need it you will have to resort to this compiler. As this function is not part of the standard nobody guarantees that the code will compile or with another compiler different, much less, in another operating system.

  

I ran the program in an IDE that I have called Turbo C ++ but I could not use its compiler from the CMD to compile it because it gives me an error which says it can not be executed on 64 bit systems

Turbo C ++ is a discontinued compiler, that is, it no longer receives maintenance or updates. As if this were not enough, a few years ago there was a general change in the PCs, which went from 32 to 64 bits ...

I'm afraid that to make it work you will have to mount a virtual machine or play with the Windows compatibility mode

    
answered by 15.06.2018 / 07:49
source