Difference between getch () and _getch ()

What is the difference between the two functions that are defined in the conio.h header file -

getch () and _getch ().

Is there any difference in decoding? Or is it just a difference due to updated standards?

+5
source share
2 answers

This is part of Microsoft’s decision a few years ago to more strictly interpret the C ++ standard. It says that all names in the global namespace that begin with an underscore are reserved for use by the implementation. This means that getchit is not a reserved name, but _getchis.

, Microsoft , " POSIX . , , " " . , .

, , POSIX. , , , , Microsoft, getch , _getch.

+7

(.. ++ ISO). , , .

+2

All Articles