void __fastcall TForm1::WriteToFile(AnsiString sLine) { FILE *OutputFile; //Zeiger auf das Logfile AnsiString sLogFileName = "test.log"; // File wird im Modus Append (a) und Text (t) geöffnet if ((OutputFile = fopen(sLogFileName.c_str(), "a+t")) == NULL) { ShowMessage("Fehler beim Öffnen der Datei"); } else { //Zeilenvorschub zum String hinzufügen sLine += "\n"; //Zeile in die Datei 1x schreiben fwrite(sLine.c_str(), sLine.Length(), 1, OutputFile); fclose(OutputFile); } }
Kategorien
-
Neueste Beiträge
- [Raspberry Pi 4] Raspberry Pi als DNS Server
- [Raspberry Pi] SSH aktivieren
- [Raspberry Pi] Bootoptionen in der config.txt
- [Raspberry Pi 4] Bessere Youtube-Videoperformance in Google Chrome
- [Raspberry Pi 4] Direkt von SSD booten (ohne SD-Karte)
- [ABAP] Fixkontentabelle (T030) auslesen
- [SAPUI5] SAPUI5 Entwicklung mit SAP Business Application Studio (BAS)
- Salatdressing
- [ABAP] Teilstring/Teilfelder (Offset und Länge) aus einer Zeichenfolge ermitteln
- Energie