你可以这样写你的类,就像AnsiString一样:
class A
{
public:
int A(int i){ return i+2;}//构造函数
};
再调用:
void functionA()
{
int x = 6;
int y = A(x);
}
这样y=8了!不用声明事例,或者:
声明事例:
void functionB()
{
TForm1 * f = new TForm1(NULL);
char * a="abc";
char * b = f->aa(a);
delete f; f=NULL;
}