擅长 C++ 的项目想法

发布于 2024-09-16 08:37:46 字数 555 浏览 3 评论 0 原文

我想在工作中加入C++团队。他们的工作是用C++编写CGI(主要但不限于)。我了解基本的 C++。阅读 C++ 图书指南 上的列表,我已经从朋友那里得到了三本书(实际上我有第一本)。

  1. C++ 编程语言 - Bjarne Stroustrup - 供参考
  2. C++ 模板完整指南 - David Vandevoorde / Nicolai M. Josuttis
  3. 现代 C++ 设计 - Andrei Alexandrescu

  1. 我想知道是否有任何项目或想法可以告诉我可以实施,以便我做得更好。

  2. 我需要的设置。我有一台 Macbook 和一台个人蹩脚的 Ubuntu 开发服务器机器。如果需要的话,我可以通过训练营来安装任何操作系统。

  3. 您能否给我一些关于如何开始编写 CGI(或任何教程)的建议?

I want to get into C++ team at work. Their job is to write CGIs in C++ (mainly but not limited to). I know basic C++. Reading the list at C++ book guide question on SO, I've got three books from a friend (I actually had the first one).

  1. The C++ Programming Language - Bjarne Stroustrup - for reference
  2. C++ Templates The Complete Guide - David Vandevoorde / Nicolai M. Josuttis
  3. Modern C++ Design - Andrei Alexandrescu

  1. I would like to know if there are any projects or ideas you can tell me that I can implement so that I get better at it.

  2. The setup I need. I have a Macbook and a personal crappy Ubuntu dev server machine. I can bootcamp to install any OS if need be.

  3. Can you please also give me some suggestions on how to begin writing CGI (or any tutorial)?

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

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

发布评论

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

评论(5

音栖息无 2024-09-23 08:37:47

让我添加到您的阅读材料清单中; C++ FAQ Lite 绝对是学习 C++ 细节的最佳资源。它既可以作为老手的参考,也可以作为初学者的入门。我强烈建议您尽可能多地阅读其中的内容,并在加入实际项目之前尝试演示所提到的每个功能的小示例。

一旦您对这门语言感到有些自在,那么我建议您查看 Github 并看看是否有任何 < a href="https://github.com/trending?l=cpp" rel="nofollow noreferrer">C++ 项目 需要一些帮助。至于计算机生成的图像或通用网关接口,两者都是与语言无关的。这些可以用任何编程语言编写,尽管不同的编程语言将具有不同的现有库来处理它们。我建议您阅读该主题以更好地理解标准/算法(取决于您指的是两者中的哪一个)。一旦您更熟悉该主题,您应该能够更好地理解相关库的文档。

至于开发环境,我发现Ubuntu是最容易配置的,因为几乎所有的设置都可以简化为一系列apt-get install命令。例如:

sudo apt-get install build-essential

无论您使用哪种操作系统,您都可能希望在可预测、可重现的环境中构建和运行代码。我还应该指出,您开发的环境不需要与您实际构建和运行代码的环境相同。例如,您可以在 Mac OS X 上编写所有代码,但在 Docker 中构建和执行代码使用您预设的、可复制的构建/运行配置运行 Ubuntu 实例的容器。

关于用 C++ 实现 CGI(以及其他代码)的资源,请查看 C++ 资源我的网站上的 页面。它列出了用于网络、计算机图形和其他 C++ 任务的多种工具,以及 Boost 和 Qt 等通用库。

Let me add to your list of reading material; the C++ FAQ Lite is absolutely the best resource for learning the ins and outs of C++. It is useful both as a reference for old timers and as an introduction to beginners. I would strongly recommend reading as much of it as you possibly can, and try small examples that demonstrate each feature mentioned before joining an actual project.

Once you feel somewhat comfortable in the language, then I would recommend taking a look at Github and seeing if there are any C++ projects that are in need of some help. As for the computer generated imagery or the common gateway interface, both of these are language agnostic. These can be written in any programming language, though different programming languages will have different existing libraries for handling them. I suggest you read up on the subject to better understand the standard/algorithms (depending on which of the two you had meant). Once you are more familiar with the subject, you should be in a better position to understand the documentation of relevant libraries.

As for the development environment, I find that Ubuntu is the easiest one to configure, because almost all setup can be reduced to a series of apt-get install commands. For example:

sudo apt-get install build-essential

Regardless of which OS you use, you will probably want to build and run your code in a predictable, reproduceable environment. I should also point out that the environment that you develop on does not need to be the same as the one on which you actually build and run your code. For example, you could write all your code on Mac OS X, but build and execute your code in a Docker container that is running an Ubuntu instance with your preset, reproduceable build/run configuration.

In terms of resources to implement CGI in C++ (and for other code), please check out the C++ resources page on my website. It lists several tools for networking, computer graphics, and other C++ tasks, as well as general purpose libraries such as Boost and Qt.

行至春深 2024-09-23 08:37:47

提高 C++ 水平的最佳方法是……编写 C++ 代码。从没有任何外部依赖项的简单光线跟踪器开始(只需将输出写入 PPM 文件)。

  1. 我认为这是一个足够有趣的问题,它将让您开始使用语言核心,
  2. 缺乏依赖关系将减少您尚未欣赏的潜在复杂的第三方库习惯用法以及库和链接等烦人的事情的干扰。另外,你会遇到更少的 C++ 怪癖。

当你有更多的经验后,在此基础上继续努力。返回,重构您的代码,添加更复杂的功能、第三方库(例如编写 JPEG 输出、开始使用 boost 位,例如智能指针)。

冲洗,重复。

The best way to become better at C++ is... writing C++ code. Start with a simple raytracer without any external dependencies (just write output to a PPM file).

  1. I think this is an interesting enough problem and will let you get started with the language core,
  2. The lack of dependencies will reduce distractions with potentially complex third-party library idioms which you can't appreciate yet and annoying things like libraries and linking. Plus, you will have less C++ quirks blow up in your face.

Build on that after you have more experience. Go back, refactor your code, add more complex features, third-party libraries (e.g. write a JPEG output, start using bits of boost, like smart pointers).

Rinse, repeat.

甲如呢乙后呢 2024-09-23 08:37:47

回答问题的标题:)假设C++03

来自 Bjarnes 网站:

1 。新学习

2.使用 C++ 的原理和实践(应该给出有关短程序/项目的想法)

3.学习和教授 C++

是的,如果您必须学习好的 C++,请有一个好的审阅者在您身边。手边保留一份相关标准的副本 (open-std.org)

answer to the title of the question :) assuming C++03

From Bjarnes website:

1. New learning

2. Principles and Practice Using C++ (Should give ideas about short programs/projects)

3. Learning and teaching C++

And yes, have a good reviewer by your side if you have to learn good C++. Keep a copy of the relevant standard handy (open-std.org)

甜妞爱困 2024-09-23 08:37:47

制作一些小项目

您可以进入高级 C++ 主题,例如表达式模板。
该项目甚至不需要做任何有用的事情,只要您能够将各个部分组合在一起以产生一些输出即可。

如果您了解一些 C++,那么仅使用 phoenix 就可以享受将语言推向极限的乐趣。

就想法而言,CGI 可能在数学方面很重,例如尝试使用表达式模板编写并行积分算法。

例如,您可以创建如下语法:

integrate(x*x + sin(x), 0, 100, threads(4));

in my opinion if you make some small project using

you can get into the advanced C++ topics like expression templates.
the project even does not have to do anything useful, as long as you are able to put pieces together to produce some output.

if you know some C++, you can have a lot of fun pushing language to limits with phoenix alone.

as far as ideas, CGI is likely to be heavy in mathematics, try for example writing parallel integration algorithm using expression templates.

for example, you can create syntax like this:

integrate(x*x + sin(x), 0, 100, threads(4));
把梦留给海 2024-09-23 08:37:47

阅读 Scott Meyers 所著的《Effective C++》一书。它非常好,并且会为您提供有关最佳实践和应避免的事情的良好建议。

Read the book 'Effective C++' by Scott Meyers. It's excellent, and will give you good advice on best practices and stuff to avoid.

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