c - setvbuf behavior different in VS 2015 -


i wanted move visual studio 2013 visual studio 2015, ran odd behavior when converted of code. following code works fine in vs 2013. works if comment out setvbuf() command. when run code in vs 2015, fgets() keeps accumulating input until enter number of characters. behavior bug, or there i'm missing?

#include <stdio.h>  int main(int argc, char* argv[]) {     setvbuf(stdin, null, _ionbf, 0);     char buf[256];      printf("waiting input\n");     fgets(buf, 80, stdin);      printf("received %s\n", buf);     return 0; } 


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -