G
G
Gina Lee2015-05-14 10:58:56
Programming
Gina Lee, 2015-05-14 10:58:56

How to connect the getchar_unlocked function?

All the best :)
I am writing in 13 visual studios. the compiler doesn't recognize the getchar_unlocked function (throws error C3861) :(
Let's say we have this super elementary thing:

#include <stdio.h>
int main()
{
  int v;
  v = getchar_unlocked();
  return v;
}

Why does not it work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mobi, 2015-05-21
@mobi

Try

#ifdef _MSC_VER
#define getchar_unlocked _getchar_nolock
#endif

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question