Witam, podczas odczytywania występuje błąd nie odnajduje czegoś takiego jak fstream.
//---------------------------------------------------------------------------
#include <fstream>
#include <vcl.h>
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
int pkt;
int st;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm1::FormCreate(TObject *Sender)
{
if(st==0)
{
Label1 -> Visible=true;
Label2 -> Visible=true;
Label3 -> Visible=true;
Button1 -> Visible=true;
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Label1 -> Visible=false;
Label2 -> Visible=false;
Label3 -> Visible=false;
Button1 -> Visible=false;
st=1;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)
{
fstream plik;
plik.open("cos.txt",ios::out);
plik<<st<<endl;
plik.close();
}
//---------------------------------------------------------------------------
logi:
[C++ Error] Unit1.cpp(49): E2451 Undefined symbol 'fstream'
[C++ Error] Unit1.cpp(49): E2379 Statement missing ;
[C++ Error] Unit1.cpp(50): E2451 Undefined symbol 'plik'
[C++ Error] Unit1.cpp(50): E2090 Qualifier 'ios' is not a class or namespace name
[C++ Error] Unit1.cpp(50): E2121 Function call missing )
[C++ Error] Unit1.cpp(51): E2451 Undefined symbol 'endl'
Proszę o pomoc, dzięki :D