I'm trying to make a function that will wait for user to press on any key then continue execution of program without requiring to use enter.

Also looking for it to be platform inderpendant (at worse I can use ifdef if theres two similar functions).

Looking for something like getch() basically, but more ansi standard.

I tried cin.get(), getchar() but both require user to hit enter.

Must work in linux and windows. And please don't say system("pause") I'm looking for an actual function! Writing my own header/library so I can stop having to reinvent the wheel every time I code C++. Planing on writing a large project once this set of libs is done.