Recommended Answers
Jump to PostOK, let's start with a few issues in your code. First off,
main()
should always be declared as typeint
in C++; there are some exceptions to this, but as a rule,void main()
is simply incorrect.Second, you seem to be using an older style of …
Jump to PostArashVenus: There really isn't any exact replacement for
getch()
, for the same reason why there wasn't a standard equivalent ofgetch()
to begin with: because 'raw' or unbuffered console I/O isn't portable across different operating systems. The C standard library, and the C++ iostream classes, work exclusively with stream I/O, …
All 7 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.