Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::istrstream::~istrstream

      From cppreference.com
      <cpp‎ |io‎ |istrstream
       
       
       
       
      virtual ~istrstream();
      (deprecated in C++98)
      (removed in C++26)

      Destroys astd::istrstream object, which also destroys the memberstd::strstreambuf.

      [edit]Parameters

      (none)

      [edit]Notes

      The constructors ofstd::istrstream do not create the underlyingstd::strstreambuf in dynamically allocated mode, so the memory leaks that are possible withstd::ostrstream::~ostrstream orstd::strstream::~strstream do not apply.

      [edit]Example

      Run this code
      #include <iostream>#include <strstream> int main(){{std::istrstream s("1.234");double d;        s>> d;std::cout<< d<<'\n';}// destructor called}

      Output:

      1.234
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/io/istrstream/%7Eistrstream&oldid=170637"

      [8]ページ先頭

      ©2009-2026 Movatter.jp