Live data from Hacker News

C++ Cheat Sheets

hackingcpp.com

1–10 of 82 posts

Re: C++ Cheat Sheets

#2
Wow, this is really good, there are still things I can learn.

C++ really has a lot of good things. It's just a shame it's so slow to compile.

I'm curious if anybody is working to make C++ faster to compile. Even if it was a subset of the language, with some features removed, it would be good enough for me.

Re: C++ Cheat Sheets

#3
post #2

Wow, this is really good, there are still things I can learn. C++ really has a lot of good things. It's just a shame it's so slow to compile. I'm curious if anybody is working to make C++ faster to compile. Even if it was a subset of the language, with some features removed, it would be good enough for me.

* Compile with clang, link with mold or at least lld. mold can link gigabyte-sized binaries in, like, one second

* Use ninja instead of make

* Use PCH

* -gsplit-dwarf

Re: C++ Cheat Sheets

#5
post #2

Wow, this is really good, there are still things I can learn. C++ really has a lot of good things. It's just a shame it's so slow to compile. I'm curious if anybody is working to make C++ faster to compile. Even if it was a subset of the language, with some features removed, it would be good enough for me.

* Compile with clang, link with mold or at least lld. mold can link gigabyte-sized binaries in, like, one second * Use ninja instead of make * Use PCH * -gsplit-dwarf

Off topic. Could you recommend an ide to work with c++?

Re: C++ Cheat Sheets

#6
post #5

Earlier quoted context omitted.

* Compile with clang, link with mold or at least lld. mold can link gigabyte-sized binaries in, like, one second * Use ninja instead of make * Use PCH * -gsplit-dwarf

Off topic. Could you recommend an ide to work with c++?

Microsoft Visual Studio for Windows and QtCreator for Linux.

Re: C++ Cheat Sheets

#7
post #5

Earlier quoted context omitted.

* Compile with clang, link with mold or at least lld. mold can link gigabyte-sized binaries in, like, one second * Use ninja instead of make * Use PCH * -gsplit-dwarf

Off topic. Could you recommend an ide to work with c++?

CLion from JetBrains and Microsoft Visual Code are the best commercial ones for Linux, NetBeans is a free (as in freedeom and open source) one (that also supports many other languages like Java and Python).

What I don't recommend is Eclipse - it's complex and confusing for beginners (but a bit faster than some others).

Re: C++ Cheat Sheets

#8
I'm usually not a fan of "cheat sheets" (HTML online documentation, man pages and even real books are quickly at hand) - but this is a useful (and pretty) synopsis of many useful library functions and recent additions to C++, thanks.

Re: C++ Cheat Sheets

#9
post #4

This should be titled "C++ Algorithms Library Cheat Sheet". It is specifically about the algorithms functions in the standard library.

There's a bunch of categories, the first one is indeed standard algorithms. Full list: Standard Algorithms, Standard Randomness, Standard Sequence Views, Standard Containers, Standard Utilities, Language Mechanisms, Libraries, Design Guidelines, Engineering, Terminology. Seems fairly comprehensive to me.

Re: C++ Cheat Sheets

#10
post #5

Earlier quoted context omitted.

* Compile with clang, link with mold or at least lld. mold can link gigabyte-sized binaries in, like, one second * Use ninja instead of make * Use PCH * -gsplit-dwarf

Off topic. Could you recommend an ide to work with c++?

I use Qt Creator on every platform
Post reply on HN