Which is better conio.h or namespace std...? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Which is better conio.h or namespace std...?

in c++

5th Aug 2017, 4:12 PM
Puneet Rana
Puneet Rana - avatar
4 Answers
+ 4
The two are not the same. conio is a C library std is a combination of many libraries
5th Aug 2017, 7:23 PM
Manual
Manual - avatar
5th Aug 2017, 7:28 PM
Manual
Manual - avatar
+ 4
As @Manual stated, they're not related. One's a header, the other an automatic scope resolver (did my wording suck?). Anyways, regarding the header, I'd avoid conio.h. There's std::cin that provides almost any conio functionality, including emulating grabbing keystrokes. The conio header is not portable and, IIRC, has not been maintained since Sauron was defeated. It would help if you post what you wish to achieve.
5th Aug 2017, 11:23 PM
Jamie
Jamie - avatar
5th Aug 2017, 7:27 PM
Manual
Manual - avatar