_getch and microsoft claims

V

vippstar

Hello comp.lang.c++

I was reading Microsofts documentation and I stumbled upon this:
<http://msdn.microsoft.com/en-us/library/ms235446(VS.80).aspx>

Quote from that page:
getch

This POSIX function is deprecated beginning in Visual C++ 2005
Use the ISO C++ conformant _getch instead.

That's really funny considering that getch is not a POSIX function
(according to IEEE-1003.1-2004, it doesn't mention it), and that from
a word search I performed in my ISO/IEC 14882:2003 document I found no
mention of _getch.

While I trust the word search I performed with POSIX, I don't trust
the search provided by my pdf software, so I'd appreciate any comments
regarding _getch. Any ideas what they're talking about?
 
J

Jean-Marc Bourguet

Hello comp.lang.c++

I was reading Microsofts documentation and I stumbled upon this:
<http://msdn.microsoft.com/en-us/library/ms235446(VS.80).aspx>

Quote from that page:

That's really funny considering that getch is not a POSIX function
(according to IEEE-1003.1-2004, it doesn't mention it),

There is a getch in curses, a unix library which isn't described by POSIX.
But I doubt very much that the getch/_getch from VC++ is the one from
curses.
and that from a word search I performed in my ISO/IEC 14882:2003 document
I found no mention of _getch.

I guess by "ISO C++ conformant" they mean that the identifier _getch is one
of those reserved for implementation while getch isn't.

Yours,
 
V

vippstar

There is a getch in curses, a unix library which isn't described by POSIX.
But I doubt very much that the getch/_getch from VC++ is the one from
curses.

However, there's a header in POSIX, named curses.h. It does not
provide getch. (I'm not saying you don't know this; I just wanted
mention it)
I guess by "ISO C++ conformant" they mean that the identifier _getch is one
of those reserved for implementation while getch isn't.

Oh yes, that's right. That's probably what they meant.

thanks.
 
B

Bo Persson

Hello comp.lang.c++

I was reading Microsofts documentation and I stumbled upon this:
<http://msdn.microsoft.com/en-us/library/ms235446(VS.80).aspx>

Quote from that page:

That's really funny considering that getch is not a POSIX function
(according to IEEE-1003.1-2004, it doesn't mention it), and that
from a word search I performed in my ISO/IEC 14882:2003 document I
found no mention of _getch.

While I trust the word search I performed with POSIX, I don't trust
the search provided by my pdf software, so I'd appreciate any
comments regarding _getch. Any ideas what they're talking about?

They are talking about the naming of the function. :)

Names starting with an underscore is reserved for the implementation
(in the global namespace). This means that, like you noticed, the ISO
C++ standard doesn't let them use the name getch, but _getch is
allowed.


Bo Persson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top