Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ofstream + append

Empfohlene Antworten

Veröffentlicht

@jemand:

Das könnte so aussehen, wichtig ist der zweite Parameter, das sind bitweise oder-verknüpfte ints (vermutlich ein enum, hängt wohl auch von der lib ab) wobei ios::app für das gewünschte append steht. Der Parameter ist mit ios::out vorbelegt, dieses wiederum ist implizit ein ios::out | ios::trunc - was truncate heißt und zur Folge hat, daß die Datei unbesehen ihres Inhalts als leer geöffnet wird... ;)


#include <fstream.h>


int main(int argc, char** argv)

{

	ofstream stout("dat.dat", ios: :out | ios::app);

	for(int i = 1; i < argc; i++)

		stout << argv[i] << endl;

	return 0;

}

Womit entwickelst du, welche Literatur hast du ?

Ich habe in der MSDN Library etwas dazu gefunden, sowie in meinem geschätzten Breymann, den hatte ich schonmal hier im Forum empfohlen.

<FONT COLOR="#a62a2a" SIZE="1">[ 23. Oktober 2001 20:24: Beitrag 1 mal editiert, zuletzt von captain haddock ]</font>

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Zitat:</font><HR>Original erstellt von EisenUli:

<STRONG>Hey Kaeptn,

kannst Du mal erklaeren, was dieser Thread soll, Frage oder eine Art Vortrag vielleicht?</STRONG>

der jemand war meine eine die nicht wußte, wie man dateien so öffnet, daß man den text anhängt und die datei beim öffnen nicht leert.

da ich eingentlich nur c programmiere, c++ aber zu meinen prozeduralen zwecken mißbrauche, hab ich halt den captain gefragt, wie man das denn macht.

@ capt. haddi:

nix entwicklungsumgebung, hab den xemacs unter unix (ein super teil, das muß ich schon lobend anmerken) und ein paar tutorials und mehrere c bücher. außerdem manpages :D:D (ich hasse diese dinger) und sonst nix!

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Zitat:</font><HR>Original erstellt von Poldi:

<STRONG>der jemand war meine eine...</STRONG>

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Zitat:</font><HR>Original erstellt von EisenUli:

<STRONG>Ah ja, ich sehe, ihr kommt bestens klar. Aber verwuestet mir das Forum nicht.

Uli</STRONG>

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.