Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
for (;;)
{
char Input_Sign;
cout << "\nWenn Sie Ihre Berechnungen noch einmal aendern wollen\n";
cout << "geben Sie J (fuer ja) ein, andernfalls N (fuer nein) ein: ";
cin >> Input_Sign;
if (Input_Sign == 'j')
{
cout<<"Ja";
}
if (Input_Sign == 'n')
{
cout<<"Nein";
break;
}
}
char Dateiname[30];
cout <<"Bitte geben Sie einen Namen fuer Ihre Datei an...";
cin.getline(Dateiname, 29);
strcat(Dateiname, ".txt");
std::ofstream Ausgabe(Dateiname);
for (;;)
{
char Input_Sign;
cout << "\nWenn Sie Ihre Berechnungen noch einmal aendern wollen\n";
cout << "geben Sie J (fuer ja) ein, andernfalls N (fuer nein) ein: ";
cin >> Input_Sign;
if (Input_Sign == 'j')
{
cout<<"Ja";
}
if (Input_Sign == 'n')
{
cout<<"Nein";
break;
}
}
char Dateiname[30];
cout <<"Bitte geben Sie einen Namen fuer Ihre Datei an...";
cin.getline(Dateiname, 29);
strcat(Dateiname, ".txt");
std::ofstream Ausgabe(Dateiname);
char Dateiname[30];
cout <<"Bitte geben Sie einen Namen fuer Ihre Datei an...";
cin.getline(Dateiname, 29);
cin.getline(Dateiname, 29);
strcat(Dateiname, ".txt");
std::ofstream Ausgabe(Dateiname);
MSDN hat gesagt.:The fflush function flushes a stream. If the file associated with stream is open for output, fflush writes to that file the contents of the buffer associated with the stream. If the stream is open for input, fflush clears the contents of the buffer. fflush negates the effect of any prior call to ungetc against stream. Also, fflush(NULL) flushes all streams opened for output. The stream remains open after the call. fflush has no effect on an unbuffered stream.
Buffers are normally maintained by the operating system, which determines the optimal time to write the data automatically to disk: when a buffer is full, when a stream is closed, or when a program terminates normally without closing the stream. The commit-to-disk feature of the run-time library lets you ensure that critical data is written directly to disk rather than to the operating-system buffers. Without rewriting an existing program, you can enable this feature by linking the program's object files with COMMODE.OBJ. In the resulting executable file, calls to _flushall write the contents of all buffers to disk. Only _flushall and fflush are affected by COMMODE.OBJ.
For information about controlling the commit-to-disk feature, see Stream I/O, fopen, and _fdopen.