std::basic_filebuf::showmanyc
Aus cppreference.com
<metanoindex/>
<tbody> </tbody> protected: virtual std::streamsize showmanyc() |
||
Wenn implementiert, gibt die Anzahl der Zeichen aus der Datei zu lesen .
Original:
If implemented, returns the number of characters left to read from the file.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Parameter
(None)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Rückgabewert
Die Anzahl der noch verfügbaren Zeichen für das Lesen aus der Datei oder
-1, wenn das Ende der Datei erreicht wurde .Original:
The number of characters available for reading from the file, or
-1 if the end of file was reached.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Notes
Diese Funktion ist optional. Wenn nicht implementiert, gibt diese Funktion
0 (da die Basisklassenversion std::basic_streambuf::showmanyc aufgerufen wird)Original:
This function is optional. If not implemented, this function returns
0 (since the base class version std::basic_streambuf::showmanyc gets called)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Ob implementiert oder nicht, wird diese Funktion normalerweise durch
std::basic_streambuf::in_avail aufgerufen, wenn der get-Bereich ist leer .Original:
Whether implemented or not, this function is normally called by
std::basic_streambuf::in_avail if the get area is empty.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Beispiel
Umsetzung Test, um zu sehen, ob showmanyc () für filebuf umgesetzt wird
Original:
implementation test to see if showmanyc() is implemented for filebuf
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
#include <fstream>
#include <iostream>
struct mybuf : std::filebuf
{
using std::filebuf::showmanyc;
};
int main()
{
mybuf fin;
fin.open("test.in", std::ios_base::in);
std::cout << "showmanyc() returns " << fin.showmanyc() << '\n';
}
Output:
showmanyc() returns 6626
