C getline function for Windows.