标题:[求助]如何将int转变为string
取消只看楼主
THE
Rank: 1
等 级:新手上路
帖 子:37
专家分:0
注 册:2007-6-30
 问题点数:0 回复次数:1 
[求助]如何将int转变为string

#include<iostream>

#include<string>
using namespace std;

int main ()
{
int i=1;
string j;

j=(string)i; // error C2440: 'type cast' : cannot convert from 'int' to 'class

cout<<j<<endl;
return 0;
}
如何将int转变为string?

搜索更多相关主题的帖子: int string 
2007-07-15 13:48
THE
Rank: 1
等 级:新手上路
帖 子:37
专家分:0
注 册:2007-6-30
得分:0 
我看不懂,请说明白点
2007-07-15 20:55



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-155497-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.393480 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved