joen0000
一般會員
發表:47 回覆:47 積分:18 註冊:2004-11-07
發送簡訊給我
|
#include
#pragma hdrstop #include "Unit1.h"
#include "math.h"
#include
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//--------------------------------------------------------------------------- void __fastcall TForm1::Button1Click(TObject *Sender)
{ int n,i,h,j;
int k=0;
TStringList *str =new TStringList();
str->LoadFromFile(Edit1->Text);
Memo1->Text=str->Text;
str->CommaText=str->Text;
h= StrToInt(str->Count)+1;
n= sqrt(h);
vector > array; // 兩個'>'間要有空白
vector > array;
array.resize(n);
for(unsigned int i = 0; i < n;i++)
array[i].resize(n);
for(i=0;iStrings[k]);
k++;
Memo2->Lines->Text=Memo2->Lines->Text+IntToStr(array[i][j]); } Memo2->Lines->Add(""); } }
我已經有 include但是 怎ㄇ說我們定義ㄋ??
|
Fm
初階會員
發表:19 回覆:66 積分:37 註冊:2003-10-15
發送簡訊給我
|
#include
#pragma hdrstop #include "Unit1.h"
#include "math.h"
#include
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//--------------------------------------------------------------------------- void __fastcall TForm1::Button1Click(TObject *Sender)
{ int n,i,h,j;
int k=0;
TStringList *str =new TStringList();
str->LoadFromFile(Edit1->Text);
Memo1->Text=str->Text;
str->CommaText=str->Text;
h= StrToInt(str->Count) 1;
n= sqrt(h);
vector > array; // 兩個'>'間要有空白
vector > array; //?????????
array.resize(n);
for(unsigned int i = 0; i < n;i )
array[i].resize(n);
for(i=0;iStrings[k]);
k ;
Memo2->Lines->Text=Memo2->Lines->Text IntToStr(array[i][j]); } Memo2->Lines->Add(""); } }
加一行
using namespace std; //---------
偏聽則誨,兼聽則明
如果那個人是我..那該多好
|
RedSnow
版主
發表:79 回覆:1322 積分:845 註冊:2003-12-15
發送簡訊給我
|
joen0000 您好: 是不是您的 include 宣告不完整所致?改一下試試看: #include .h>
|
joen0000
一般會員
發表:47 回覆:47 積分:18 註冊:2004-11-07
發送簡訊給我
|
|
joen0000
一般會員
發表:47 回覆:47 積分:18 註冊:2004-11-07
發送簡訊給我
|
|