how to use getchar_unlocked() in windows compiler

whenever i try to use getchar_unlocked(); in my program the compiler says its is not declared in this scope how to resolve this error

getchar_unlocked() is not a C/C++ standard function.
That’s why it doesn’t work in Windows. You have to replace it with some other function like scanf/getchar etc.,

Thanks.

1 Like

@harsha2904 but that wont be fast enough isnt there any way to use getchar_unlocked() in windows or do i have to use linux for it

@harsha2904 you have to use getchar() in windows, for getchar_unlocked() you have to use linux.

1 Like

@mayankb_03 ya, that’s right. I was talking abt windows.
@yogeshforyou : the best way is to code in “ideone.com”.

1 Like

@mayankb_03 @harsha2904 thanks