谢谢你的回答,我想再问的是如果要避免string截断输入的话,应该换哪一种方式?换了的话是不是就不能用string::size_type了??
追答http://baike.baidu.com/link?url=EfZzbDbBjb49vOV35i8GSdMRWowbwaE5eXYjWq8WQ3UvD8GzdmokLJ5UwVJ4UIXHfys7OxHvGNqVvNl4ArzHgK
这个例子就是,你自己去指定截断符。
string::size_type 其实和int差不多。使用int最好
原来如此啊.....那么大学教的时候用vc6.0岂不是误导吗....