I am looking for C++ code to get getch() and getche() functions for linux. I briefly looked at the code and I saw that they are using the
static struct termios old, new;
tcsetattr(0, TCSANOW, &new); /* use these new terminal i/o settings now */
This is valid C code but it is not valid C++.
new is a keyword in C++ and cannot be used as an variable name.