c++ anfänger
-
Hallo ihr,
will grade eine stink normale txt datei mittes ofstream beschreiben. sobald ich die befehel einbinde erhalte ich folgende fehlermeldung während der laufzeit. nicht vorher!
Debug Assertion failed!
Program: ...VisualStudio2008\Projects\Projekt\Debug\projekt.exe
File: f:\dd\vctools\crt_bld\self_x86\crt\src\open.c Line: 306Expression: ( "Invalid sharing flag", 0 )
Was ist da los ??
Gruß
-
Code?
-
[code]
void schreiben(string typ){//cout << "\nDie Verkaufte Karte ist eine: " << typ ;
ofstream kasse ;
kasse.open("karten.txt", ios_base::out, ios_base::app) ;
if ( !kasse )
cerr << "Datei kann nicht geoeffnet werden!\n" ;kasse << typ ;
kasse.close() ;
}code]
-
das habe ich eingebunden
#include "stdafx.h"
#include <conio.h>
#include <stdlib.h>#include <iostream>
#include <fstream>
#include <string>using namespace std;
-
kasse.open("karten.txt", ios_base::out | ios_base::app) ;
-
argh...das pipe zeichen

sry, anfänger.. jetzt kenn ich die meldung

danke für die schnelle hilfe. funktioniert.
-
Das ist kein Pipezeichen, sondern bitweises oder.