BCB!让我又爱又恨......痛苦中ing,放分!!!
//---------------------------------------------------------------------------
#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::Button1Click(TObject *Sender)
{
String tmps="0x";
tmps=tmps+ Edit1->Text;
UCHAR c=StrToInt(tmps.c_str());
c=StrToInt(tmps); //有时候竟然编译出错!Cannot convert 'AnsiString' to 'const char *'
}
//---------------------------------------------------------------------------
c=StrToInt(tmps); //有时候竟然编译出错!Cannot convert 'AnsiString' to 'const char *'
不是编译器的原因,我新打开一个Application则没有问题;
不是程序原因;没有自定义的StrToInt函数?奇怪啊;
大家谈谈这方面的想法吧!