编写最简洁的 Visual C++ 的提示您可以在 Visual Studio 2005 中编写代码吗?
虽然我意识到 Visual C++ 是一种缺乏我们大多数新程序员现在所习惯的语法糖的语言,但 VC++ 2005 必须有一些快捷方式,至少可以稍微减少代码的冗长;有谁知道这些,或者 c++ 就是那么冗长吗?
While I realize that Visual C++ is a language lacking much of the syntactic-sugar that most of us new programmers are used to these days, VC++ 2005 must have some shortcuts that can decrease the verbosity of the code at least a little; does anyone know of these, or is c++ just that verbose?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
VC++ 提供了一些不属于 C++ 标准的扩展,现在我想到的唯一一个是“foreach”,但我不明白为什么有人会使用它,因为 boost 提供了一种可移植的实现。
唯一的其他建议是使用标准库并尽可能多地提升,而不是重新发明其他人已经实现的东西(可能比你更好)。
VC++ offers a couple of extensions that are not part of C++ standard, the only one that comes to my mind right now is "for each" but I can't see why somebody would use it since boost offers a portable implementation.
The only other advice is to use standard library and boost as much as possible and not reinvent the things somebody else had already implemented (probably much better than you could).