有关构建 C++ 的任何提示使用win32的代码?

发布于 2024-08-23 15:48:27 字数 225 浏览 4 评论 0原文

我正在尝试通过使我的代码更加结构化和可读来提高我的编码技能。我编写了 GUI(感谢编辑)。我一直在阅读 Firefox 的开源代码来进行改进,但它使用 GTK+ 而没有太多 Win32。

在哪里可以找到用 Win32 编码的开源(专业)程序?

还有一件事:什么时候应该编写伪代码?我以前从未这样做过,但我知道这很像概述一篇文章。在对项目进行编码之前是否应该编写伪代码?还是只是功能?

谢谢

I am trying to improve my coding skills by making my code more structured and readable. I code the GUI (thanks edit). I have been reading through Firefox's open source code to improve but it uses GTK+ and not much Win32.

Where can I find an open source (professional) program that is coded in Win32?

One more thing: When should one write pseudocode? I've never done this before, but I know it's much like outlining an essay. Should pseudocode be written before coding the project? or just functions?

Thanks

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

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

发布评论

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

评论(4

节枝 2024-08-30 15:48:27

我建议您学习如何使用可在所有主要桌面平台上运行的可移植工具包和库,而不是学习 Win32 API。特别是,请查看:

  • C++ 标准库:字符串、文件 I/O、容器、算法
  • Boost 库:智能指针、网络 I/O、信号/槽、多线程、文件系统、序列化等等。
  • Qt:便携式 GUI 工具包。

这些库具有更高级别的 API,比裸露的 Win32 API 使用起来更加愉快(IMO)。

要“概述”您的程序(尤其是面向对象样式的程序),请查看统一建模语言

Instead of learning Win32 API, I recommend that you learn how to use portable toolkits and libraries that will run on all major desktop platforms. In particular, check out:

  • C++ standard library: strings, file I/O, containers, algorithms
  • Boost libraries: Smart pointers, network I/O, signals/slots, multithreading, filesystem, serialization, and many more.
  • Qt: Portable GUI toolkit.

These libraries have higher-level APIs that are much more pleasant (IMO) to use than the bare Win32 API.

To "outline" your programs, (especially object-oriented style programs) check out the Unified Modeling Language.

趁微风不噪 2024-08-30 15:48:27

伪代码通常用于向使用不同语言的人表达想法。它经常出现在科学论文中(有助于理解解决方案、算法等)

pseudocode is usually used to express ideas to people who use different languages. It appears really often in scientific papers (helps to understand solutions, algorithms and so on)

荆棘i 2024-08-30 15:48:27

作为一名 Unix 程序员,我对 Windoze 问题无能为力。

至于伪代码,将其视为一种将您的想法整合在一起的方式,就像您在真正的事情之前写出一封信或一篇文章的大纲一样。如果有任何复杂的问题需要解决,我喜欢这样做,因为我发现编译和调试更容易。不过,你比我更了解自己……

As a Unix programmer I can't help much with the Windoze question.

As for pseudocode, think of it as a way of getting your thoughts together, much as you might write an outline of a letter or an essay before the real thing. I like to do it if there is any complexity to work out because I find that the compiling and debugging are easier. However, you know yourself better than I do ...

笛声青案梦长安 2024-08-30 15:48:27

你应该看一下 chrome 源代码,它是 Win32(现在也是 Linux)和 c++。我从中学到了很多。

PS:当您编写Win32 时,您的具体兴趣是什么?图形用户界面?系统调用?

You should take a look at the chrome source which is both Win32 (and now also Linux) and c++. I learned a lot from it.

PS: When you write Win32, what is your exact interrest? GUI? System calls?

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