conio. h library in C language for Ubuntu

Asked

Viewed 7,523 times

5

I’m programming in C on Ubuntu’s Codeblock. I am trying to add a library conio.h. During several researches I found a site that for the sake of incompatibility in Ubuntu with the conio library. h, a group created gconio.h. So I should download a file on this site called gconio. h and save to folder (/usr/include), but my Ubuntu is not allowing me to save or copy and paste into that folder. Can someone help me understand why?

Site I mentioned above: http://terminaldeinformacao.com/2012/08/25/programacao-gcc-gconio-h/

2 answers

6


conio.h is not part of the standard C language library. It was actually programmed to be used in MS-DOS, but you probably want to use that port, which is basically a conio.h linux port.

Note that this port uses the library ncurses as a backend, and that unless you are porting a Borland C application to Linux, it makes no sense to use the conium library, but ncurses.

  • Ah, I get it. I’m going to look into this ncurses library. Thank you very much. ;)

  • Yes, it’s just that I’m a beginner in linux and besides downloading I had to search how to install too. But thanks, I was able to download by your link.

  • 1

    Sorry, I don’t know how to play it right yet. I think I’ve accepted it now. It appeared there?

2

You are not allowed to put the file in the folder. To do this you need to go to where you downloaded the gconio.h and run the following command sudo cp gconio.h /usr/include/gconio.h.

Will ask you for the root password is just put and load enter.

Or you can use ncurses as already suggested.

  • Thanks, I used ncurses but it’s always good to know how to do it another way. ;)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.