vc6和vc7中的CString有什么区别?

发布于 2024-07-08 22:07:30 字数 29 浏览 6 评论 0原文

vc6和vc7中的CString有什么区别?

What is the difference between CString in vc6 and vc7?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦一生花开无言 2024-07-15 22:07:30

CString在VC7中从MFC中删除,以便它可以在MFC和ATL项目中使用。 架构完全改变了:

  • 在VC6中,CString没有基类。 在VC7中,基类是CStringT。 它派生自 CSimpleStringT
  • 在 VC7 中,您还可以获取显式 char 和 wchar_t 字符串的 CStringA 和 CStringW。

我不知道它们之间有任何行为差异,但文档在 VC6 中使用起来要容易得多。 这些方法分散在 VC7 中的基类之间。

CString was removed from MFC in VC7 so that it could be used in both MFC and ATL projects. The architecture was completely changed:

  • In VC6, CString had no base class. In VC7, the base class is CStringT<TCHAR> which derives from CSimpleStringT<TCHAR>.
  • In VC7, you also get CStringA and CStringW for explicit char and wchar_t strings.

I'm not aware of any behavior differences between them, but the documentation is much easier to use in VC6. The methods are scattered between the base classes in VC7.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文