注册 登录
编程论坛 C++ Builder

怎么样将类似"100,100"的字符串转化成两个整数100

little_stone 发布于 2007-06-22 14:39, 1281 次点击
怎么样将类似"100,100"的字符串转化成两个整数100
2 回复
#2
IPV62007-07-18 13:18
可以这样:
AnsiString asTemp = "100,100";
AnsiString FTemp = asTemp.SubString(0,asTemp.Pos(",")-1);
AnsiString STemp = asTemp.SubString(asTemp.Pos(",")+1,asTemp.length());
结果是:FTemp : 100 STemp :100
#3
zdzd232007-07-27 13:11
1