codegear und ostream istream.rdbuf()
-
hole leute
hab im thread http://www.c-plusplus.net/forum/viewtopic-var-t-is-264319.html
ein problem mit codegear.dort hab ich auch beschrieben was mir codegear als fehlermeldung ausgibt
Fehler 00114. 0x310000 (Thread 0x0EF4): Falscher Parameter: Falsches Datei- oder Pipe-Stream (0x329DF840) wurde an die Funktion weitergegeben. fputc(0xFFFFFFFF ['ÿ'], 0x329DF840) | c:\program files\codegear\rad studio\6.0\include\../include/dinkumware/fstream Zeile 55: | template<> inline bool _Fputc(char _Byte, _Filet *_File) | { // put a char element to a C stream |> return (fputc(_Byte, _File) != EOF); | } | Aufrufhierarchie: 0x0041E2B1(=webcontrol.exe:0x01:01D2B1) c:\program files\codegear\rad studio\6.0\include\../include/dinkumware/fstream#55 0x0041CF9E(=webcontrol.exe:0x01:01BF9E) c:\program files\codegear\rad studio\6.0\include\../include/dinkumware/fstream#246 0x004036C3(=webcontrol.exe:0x01:0026C3) c:\program files\codegear\rad studio\6.0\include\../include/dinkumware/streambuf#144 0x0041BCE0(=webcontrol.exe:0x01:01ACE0) c:\program files\codegear\rad studio\6.0\include\../include/dinkumware/streambuf#707 0x0041B615(=webcontrol.exe:0x01:01A615) c:\program files\codegear\rad studio\6.0\include\dinkumware\xutility#1515 0x0041AEB2(=webcontrol.exe:0x01:019EB2) c:\program files\codegear\rad studio\6.0\include\dinkumware\xutility#1540
koennte von euch jemand der codegear C++ builder 2008 hat, folgendes codefragment mit aktiven codeguard austesten ?
std::ofstream datei("datei.txt"); std::stringstream ss (stringstream::in | stringstream::out); ss << "120 42 377 6 5 2000"; datei << ss.rdbuf();
ich hoffe das das mit dem stringstream auch so funktioniert.
Meep Meep
-
#include <fstream> #include <sstream> std::ofstream datei("datei.txt"); std::stringstream ss; ss << "120 42 377 6 5 2000"; datei << ss.str();