主题:高人来看看我的小问题
刚开始学C++ builder,但照着书上的程序写下来之后就是不能运行,为什么呢?
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
if (Label1->Caption=="hello world")
{Label1->Caption="世界,你好";
}
else
{Label1->Caption="hello world";
}
}
//---------------------------------------------------------------------------
运行之后,显示下面的提示:
[Linker Fatal Error] Fatal: Expected a file name:
为什么阿?
另外,我照着书写了好几个程序,不是这个问题,但也不能运行。真急人。谢谢高人了
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
if (Label1->Caption=="hello world")
{Label1->Caption="世界,你好";
}
else
{Label1->Caption="hello world";
}
}
//---------------------------------------------------------------------------
运行之后,显示下面的提示:
[Linker Fatal Error] Fatal: Expected a file name:
为什么阿?
另外,我照着书写了好几个程序,不是这个问题,但也不能运行。真急人。谢谢高人了