TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Learn Modern C++

204 点作者 nalgeon超过 1 年前

19 条评论

jenadine超过 1 年前
The tutorial starts with<p><pre><code> cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; &#x27;\n&#x27;; </code></pre> But the most &quot;modern&quot; way to write to the console is:<p><pre><code> std::println(&quot;Hello World!&quot;);</code></pre>
评论 #38772888 未加载
评论 #38772460 未加载
评论 #38773495 未加载
评论 #38773220 未加载
评论 #38774664 未加载
评论 #38773593 未加载
评论 #38772640 未加载
评论 #38774374 未加载
评论 #38775570 未加载
评论 #38776438 未加载
评论 #38774973 未加载
评论 #38775122 未加载
评论 #38775095 未加载
评论 #38772731 未加载
评论 #38773855 未加载
asicsp超过 1 年前
See also &quot;Modern C++ Programming Course&quot; <a href="https:&#x2F;&#x2F;github.com&#x2F;federico-busato&#x2F;Modern-CPP-Programming">https:&#x2F;&#x2F;github.com&#x2F;federico-busato&#x2F;Modern-CPP-Programming</a>
harporoeder超过 1 年前
I feel that modern c++ is a game of how many times you can fit `const` in a single declaration. I usually have at least three for the simplest of functions.
评论 #38773688 未加载
aragonite超过 1 年前
As someone who strongly regrets the fact that most programming languages arbitrarily restrict valid identifiers to Unicode &quot;word characters&quot; (ID_START and ID_CONTINUE), I was pleasantly surprised to discover the other day that, like Racket, Clojure, Julia and Swift, you can use emojis and pretty much any Unicode symbols in C++ identifiers!
评论 #38775742 未加载
tcfhgj超过 1 年前
When you are finished there, you can continue learning Modern C++ here:<p><a href="https:&#x2F;&#x2F;isocpp.github.io&#x2F;CppCoreGuidelines&#x2F;CppCoreGuidelines" rel="nofollow noreferrer">https:&#x2F;&#x2F;isocpp.github.io&#x2F;CppCoreGuidelines&#x2F;CppCoreGuidelines</a>
mebassett超过 1 年前
why would someone learn c++ in 2024, assuming one is not about to work on legacy projects? I&#x27;m about to start a quixotic new personal project and was considering using (read: learning) c++ for it, but it feels like rust is getting all the new attention. (and I&#x27;m already spoiled by haskell and racket.)
评论 #38776668 未加载
评论 #38775768 未加载
评论 #38775535 未加载
评论 #38791197 未加载
conradfr超过 1 年前
I have not done a &quot;desktop&quot; program in 25+ years and never using C++ (or C), since then I&#x27;m mostly a web developer (PHP, Elixir, JS, Kotlin etc).<p>I&#x27;m currently doing a C++ audio plugin with the Juce framework.<p>This website has been a good resource, alongside <a href="https:&#x2F;&#x2F;www.learncpp.com" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.learncpp.com</a><p>But I was actually close to give up before using those two things:<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;nlohmann&#x2F;json">https:&#x2F;&#x2F;github.com&#x2F;nlohmann&#x2F;json</a> : my plugin use a json api backend and the Juce json implementation is atrocious (apparently because of being born with a previous C++ version), but this library is GREAT.<p>- ChatGPT 4. I&#x27;m not sure I would have &quot;succeeded&quot; without it, at least not in a reasonable time frame. ChatGPT 3.5 is slow and does not give good results for my use case but 4 is impressive. And I use in a very dumb way, just posing question in the web UI. I probably could have it directly in MSVC?<p>Also I must say, for all its flaws, I have a renewed appreciation for doing UI on the web ;)
subharmonicon超过 1 年前
I’ve been using C++ since the late 80’s and for the last 15+ years it’s been reluctant and only due to the projects I’ve worked on and the people I’ve worked with.<p>I’d love to be in a position to work on a new project using Rust or Haskell instead.
csk111165超过 1 年前
Looks clean! Just was wondering which framework&#x2F;service do you use for hosting these md files? I am asking as I find myself motivated to host my own site like this consisting of mdfile.
AtlasBarfed超过 1 年前
Soooo.. front and center of c++ ...<p>Are string literals only 8 bit chars aka no real Unicode? The description danced around it so much it sounds like obfuscation
评论 #38777318 未加载
csk111165超过 1 年前
I guess, we already have *www.learncpp.com* which includes most of the topics mentioned in moderncpp.com
jocoda超过 1 年前
Looking for resources on C++ for MacOS (GUI). Anyone?
Usingless超过 1 年前
what about <a href="https:&#x2F;&#x2F;www.cprogramming.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.cprogramming.com&#x2F;</a>?
评论 #38775030 未加载
w10-1超过 1 年前
It&#x27;s extremely hard to write good tutorials. This one is very clear, but seems to have no time budget or reader model. I appreciate the clarity and the extensiveness, but it mainly makes me wish for something different.<p>Today there are so many IDE&#x27;s and online coding environments, godbolt, Swift playgrounds, golang interactive tutorials, etc. It would be lovely to see a C++ tutorial join that trend.<p>I find the tutorial unsettling from the first words: `original, self-contained`. My first step in writing a tutorial would be to link the current state of the art, and the last would be a section pointing users to further resources, if my goal were not to trap readers but to help them. (Originality is a tall claim as the internet spawns LLMs.)<p>Without any orientation to the landscape, the tutorial proceeds step-by-step with topologically-sorted vignettes that explain themselves verbosely.<p>hello-world is prefixed by a long explanation why people start with hello-world, and following by 16 paragraphs of (to me) excruciating hand-holding and suggested experiments, without re-quoting the code. It&#x27;s like pair-programming with someone who tells you what to type.<p>The original K&amp;R book was breathtakingly brief, mainly just showing you how to do things. Effective C++ neatly crystallized specific problems and solutions. Both benefited most by what they left out.<p>Outside of an interactive tutorial for newbie&#x27;s, what&#x27;s needed for &quot;modern&quot; C++ is an origin story for each feature: what motivated it, how backwards-compatibility shaped it, what design decisions were made, how well it has been implemented and used -- ideally with bonus comparisons how Rust and Swift and Go managed the same issues. I think that would help people remember the complex issues and the syntax, and how to use it.<p>To me most of the discussion from the C++ originators is more expository than explanatory: `for each opinion, explain in detail with cross-references to other opinions` - the political template. But readers only need to know the distinctions that make a difference in when and how they use a feature.<p>Actual users are busy and paid only to get things done, not sling words. Users who value their time will pay for a good resource.
评论 #38775129 未加载
binary132超过 1 年前
Rust posts on HN generate drama because of Rust People bickering with Anti-Rust People.<p>C++ posts on HN generate drama because of C++ People bickering with C++ People.
评论 #38773568 未加载
评论 #38774644 未加载
评论 #38774969 未加载
7thaccount超过 1 年前
Honest question here. How hard and frustrating is it to keep up with all this junk?<p>As someone familiar with nearly a dozen scripting languages, I keep trying for something low level like C++, but it seems like these languages are impenetrable at times. It&#x27;s hard enough to learn the machine stuff and manual memory management, but having the syntax change more often than a toddler&#x27;s favorite color just makes it all seem impossible.
评论 #38773973 未加载
评论 #38774043 未加载
评论 #38775004 未加载
评论 #38773451 未加载
评论 #38773820 未加载
评论 #38774834 未加载
评论 #38773345 未加载
评论 #38773738 未加载
评论 #38773685 未加载
评论 #38774106 未加载
评论 #38775007 未加载
评论 #38774968 未加载
kajaktum超过 1 年前
C with classes is peak C for me. C++ is best when it is fixing C, not when it tries to be something else entirely.
评论 #38773822 未加载
评论 #38774427 未加载
评论 #38775180 未加载
评论 #38773075 未加载
评论 #38774982 未加载
jimbobthrowawy超过 1 年前
It&#x27;d be nice to have next&#x2F;previous links somewhere on the page to navigate between the entries which are meant to be read in order.
throwuxiytayq超过 1 年前
The introductory tutorial comes with a GitHub repo. Chad move. Makes it easy to put on my e-reader.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;cpp-tutor&#x2F;learnmoderncpp-tutorial">https:&#x2F;&#x2F;github.com&#x2F;cpp-tutor&#x2F;learnmoderncpp-tutorial</a>