如何将 LONG 转换为 CString?
我想将 long 转换为 cstring。
我已经为此苦苦挣扎了一段时间,并且看到了解决这个问题的多种变体,或多或少充满了麻烦和焦虑。
我知道这个问题看起来很主观,但我认为这确实不应该。当环境涉及 MFC 和伴随这些环境的标准库时,必须有一种被认为是最好的方法。
我正在寻找一种可行的单行解决方案。有点像 C# 中的 long.ToString() 。
I want to cast a long to a cstring.
I've been struggling with this for a while and I've seen so many variants of solving this problem, more or less riddled with hassle and angst.
I know the question seems subjective, but it really shouldn't be in my opinion. There must be a way considered to be the best when the circumstances involve MFC and the standard libs that come with those circumstances.
I'm looking for a one-line solution that just works. Sort of like long.ToString() in C#.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
很简单:
It's as simple as:
有很多方法可以做到这一点:
There are many ways to do this: