关于SUBSTRING!在线等,解决立即结帖。
//---------------------------------------------------------------------------
#include <iostream>
#include <vcl.h>
#pragma hdrstop
#include <stdio.h>
#include <stdlib.h>
#include <dstring.h>
//---------------------------------------------------------------------------
#pragma argsused
void main()
{
AnsiString s1;
s1 = "forest";
cout << s1 << "\t" << sizeof(s1) << "\n";
s1.SubString(1,1);
cout << s1 << "\t" << sizeof(s1) << "\n";
getchar();
}
//---------------------------------------------------------------------------
输出结果应该是
forest 4
o 1
但是我的输出结果是
forest 4
forest 4
请问各位是为什么啊??
急!!