|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
它有很多缺点的,有兴趣可以到网上去搜索一下。于是微软有发明了“下一代”C++:C++/CLI语言,这个可以解决在.NETFramework中,托管C++产生的问题。在《程序员》杂志上,lippman和李建中合作连载介绍了C++/CLI语言。年夜写|算法|中文|转换代码以下:
//加到类的界说部分
privatestaticstring[]cstr={"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"};
privatestaticstring[]wstr={"","","拾","佰","仟","f","拾","佰","仟","|","拾","佰","仟"};
//数字必需在12位整数之内的字符串
//挪用体例如:Label1.Text=ConvertInt("数字字符串");
publicstringConvertInt(stringstr)
{
intlen=str.Length;
inti;
stringtmpstr,rstr;
rstr="";
for(i=1;i<=len;i++)
{
tmpstr=str.Substring(len-i,1);
rstr=string.Concat(cstr[Int32.Parse(tmpstr)]+wstr[i],rstr);
}
rstr=rstr.Replace("鳞爪","拾");
rstr=rstr.Replace("零拾","零");
rstr=rstr.Replace("零佰","零");
rstr=rstr.Replace("零仟","零");
rstr=rstr.Replace("零f","f");
for(i=1;i<=6;i++)
rstr=rstr.Replace("零零","零");
rstr=rstr.Replace("零f","零");
rstr=rstr.Replace("零|","|");
rstr=rstr.Replace("零零","零");
rstr+="圆整";
returnrstr;
}
有个问题想请教你一下,呵呵:)你觉得将来学什么方向比较好,我真是想不出来,知道的太少了,麻烦了。 |
|