Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      fgetws

      From cppreference.com
      <c‎ |io
       
       
      File input/output
      Types and objects
      Functions
      File access
      Unformatted input/output
      (C95)(C95)
      fgetws
      (C95)
      (C95)(C95)
      (C95)
      (C95)

      Formatted input
       
      Defined in header<wchar.h>
      wchar_t* fgetws(wchar_t* str,int count,FILE* stream);
      (since C95)
      (until C99)
      wchar_t* fgetws(wchar_t*restrict str,int count,FILE*restrict stream);
      (since C99)

      Reads at mostcount-1 wide characters from the given file stream and stores them instr. The produced wide string is always null-terminated. Parsing stops if end-of-file occurs or a newline wide character is found, in which casestr will contain that wide newline character.

      Contents

      [edit]Parameters

      str - wide string to read the characters to
      count - the length ofstr
      stream - file stream to read the data from

      [edit]Return value

      str on success, a null pointer on an error

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]References

      • C23 standard (ISO/IEC 9899:2024):
      • 7.29.3.2 The fgetws function (p: TBD)
      • C17 standard (ISO/IEC 9899:2018):
      • 7.29.3.2 The fgetws function (p: TBD)
      • C11 standard (ISO/IEC 9899:2011):
      • 7.29.3.2 The fgetws function (p: 422)
      • C99 standard (ISO/IEC 9899:1999):
      • 7.24.3.2 The fgetws function (p: 367-368)

      [edit]See also

      reads formatted wide character input fromstdin, a file stream or a buffer
      (function)[edit]
      gets a wide character from a file stream
      (function)[edit]
      (C95)
      writes a wide string to a file stream
      (function)[edit]
      read from a stream into an automatically resized buffer until delimiter/end of line
      (function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=c/io/fgetws&oldid=160022"

      [8]ページ先頭

      ©2009-2025 Movatter.jp