Ver Mensaje Individual
  #1  
Antiguo 04-09-2007
Avatar de Yusk333
Yusk333 Yusk333 is offline
Miembro
 
Registrado: ago 2007
Posts: 34
Reputación: 0
Yusk333 Va por buen camino
Programa para sobre escribir un archivo

ya estuve viendo sobre un programa para sobre escribir pero estaba en delphi ahora lo kiero hacer en c+ el archivo a modificar contiene texto ,, pero no es un txt

Cita:
// text_write.cpp
// compile with: /clr
using namespace System;
using namespace System::IO;

int main()
{
String^ fileName = "textfile.txt";

StreamWriter^ sw = gcnew StreamWriter(fileName);
sw->WriteLine("text");
sw->Write("text");
sw->WriteLine("text");
sw->WriteLine("text");
sw->WriteLine("text");
sw->WriteLine(text);
sw->Close();
Console::WriteLine("a new file ('{0}') has been written", fileName);

return 0;
}

chequen y me dicen ,,

y al final que abra el explorer o el navegador ya sea explorer o mozilla ,, eso si no tengo idea

gracias de antemano
Responder Con Cita