We recommend using Visual Studio 2017



The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at cgets.

This POSIX function is deprecated. Use the ISO C++ conformant _cgets or security-enhanced _cgets_s instead.

System_CAPS_ICON_important.jpg Important

This API cannot be used in applications that execute in the Windows Runtime. For more information, see HYPERLINK "http://msdn.microsoft.com/library/windows/apps/jj606124.aspx" \o "CRT functions not supported with /ZW" CRT functions not supported with /ZW.