[ C programming] Header file didn't work | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

[ C programming] Header file didn't work

Hello Solo Learners, Below there's my code of finding Greater Common divisor. But in my code the header file ( <conio.h> ) is not working and compilation get terminated. Can anyone tell me what's wrong ? https://code.sololearn.com/ceHb0f5PazFT/?ref=app

10th Jun 2022, 2:45 PM
Lucifer
Lucifer - avatar
4 Answers
+ 2
Lakshay Conio.h is not a standard header file. That is why you can't use it everywhere. It was part of turbo c++ compiler which was used on dos os and it is 16 bit compiler. That means programs compiled from that compiler can't even run on 64 bit OS which we use nowadays. Using or learning it is completely useless and will not teach you any basics. To clear screen you can use system("clear") which can be used in sololearn because it uses Linux to run programs. On windows you can use system("cls") And don't forget to include stdlib.h
10th Jun 2022, 2:50 PM
NonStop CODING
NonStop CODING - avatar
0
conio.h is for DOS compilers and is basically depreciated at this point.
10th Jun 2022, 2:51 PM
Slick
Slick - avatar
10th Jun 2022, 5:21 PM
Sea Carp
Sea Carp - avatar
0
Then why it is working in my Mobile C (Android compiler)
13th Jun 2022, 5:10 AM
Lucifer
Lucifer - avatar