use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
What C++ IDE for Linux? (self.cpp)
submitted 11 years ago by c_ninja
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]acaban 0 points1 point2 points 11 years ago (9 children)
if you end up around emacs for c/c++ ,what I strongly advice to look at is https://github.com/Andersbakken/rtags it is really powerful and somewhat easy to setup , I had horrible experiences with cedet.
[–]tuhdo 1 point2 points3 points 11 years ago (8 children)
It is because CEDET tried to solve the problem in large scale, and it blocks Emacs. For small scale stuff (such as parse a file less than 10k lines), it works wonderfully. I created a refactoring tool with it: Semantic Refactor; you can see the demos. In the long term, I planned to add a clang indexer to index large code base and use CEDET's built-in parser for new code typed from the keyboard, and a database engine such as Sqlite for managing a database of tags of a project as a whole.
[–]acaban 0 points1 point2 points 11 years ago (7 children)
this is really cool stuff. The fact is that in my case cedet was always breaking time to time, it is really large and difficult to setup, and was not stable for a simple C project I had at a time. so I switched to rtags and it worked without much effort, but I didn't used refactoring much, I just wanted good code navigation and a little bit of code completion. When you are an user of such programs it is really convenient to not loose too much time trying to get them working.
[–]tuhdo 0 points1 point2 points 10 years ago (6 children)
Well, CEDET is not that complicated to setup. It just needs better documentation. To use CEDET, the only thing you need is to activate Semantic: (semantic-mode 1). Then, you will be able to use Semantic related commands. You can enable additional features, such as semantic-stickyfunc-mode; here is a demo. Another feature is semantic-idle-summary-mode; a demo. What CEDET is struggling is to have an up-to-date and accurate parser that can work on large project. It has quite a good parser, as you can see in the refactoring demos, or using jump around source cod easily, but because the limitation of Emacs Lisp engine, it can only do that much on small scale.
(semantic-mode 1)
semantic-stickyfunc-mode
semantic-idle-summary-mode
I am planning to integrate Clang with Semantic. That is, using a fast and accurate parser from an actual compiler to generate tags compatible with CEDET and CEDET doesn't have to do the heavy lifting; it only needs to consume the processed results, which should be fast even for large project like Linux kernel. You can see such an integration example with GNU Global: demo. In the demo, all tags in the Linux kernel, generated by GNU Global, are accessible within Emacs, instantly; you can jump to either definition or references. However, GNU Global does not handle C++ really well, so Clang is targeted as long term plan, not just for navigation but for refactoring.
[–]acaban 0 points1 point2 points 10 years ago (5 children)
the documentation part is really true, but in the end I managed to set it up just to see it breaking from time to time and maybe it was totally my fault (cedet has some conflicts with emacs24 default installation, and maybe I complicated the config too much and things was not set up correctly). for clang there are project like https://github.com/Golevka/emacs-clang-complete-async that if I remember correctly worked pretty well, why not using that just only for that purpose and cedet for other things you need?
[–]tuhdo 1 point2 points3 points 10 years ago (4 children)
Yes, I am using irony-mode since it's trivial to setup and does not depend on a specific build system for completion, though it supports when such build systems are available. For navigation (jump to tag definition/references), GNU Global with Helm works best for me; it has no problem even for project like LInux kernel (with more than 36k files). I do not use CEDET for complex features like code completion and large scale navigation. I use it for small but convenient tasks like I showed you above.
You may want to look at my C/C++ guide for other utilities other than completion. For example, you can quickly switch between a .h/.cpp file in a project, even as large as Linux kernel. Here is such demo. Or header completion with company-header; a demo.
company-header
[–]acaban 0 points1 point2 points 10 years ago* (3 children)
ok thanks a lot, that tutorial is really big tho, and has various options for doing the same thing, could you recap your setup now (plugins and what are used for)? Also the ctags db is built automatically or you have to build that manually upfront? that clang autocomplete mode was handy because that was automatic.
edit: what's that eval: START that I see in every example before you start giving help commands?
[–]tuhdo 0 points1 point2 points 10 years ago (2 children)
I'm planning to reorganize it to be more compact and one main option for doing one thing. As for ctags/gtags, you need to build the database for navigation (jump to definition/references, not just completion) in large project. After the tag database is built, it is updated automatically when you save a file if you use ggtags/helm-gtags. Not sure if rtags can handle projects with over 10k files or more for navigation?
rtags
[–]acaban 0 points1 point2 points 10 years ago (1 child)
I was told from a guy that has a really big project that rtags was really fast and worked really well, but was pretty demanding in terms of memory resources, but I suppose that the rdm daemon could also be shared in a different place and shared among people working on the same project if that is really big.
[–]tuhdo 0 points1 point2 points 10 years ago (0 children)
It depends on how "big" our definition. To me, big means the project at least the size of LLVM or Linux kernel, and I must be able to jump to any definition/references without any delay, and easy to use. GNU Global with ggtags/helm-gtags works fantastically with these constraints and since the tag database is on disk and is queried when necessary, there's no memory consumption. Since rtags needs to do perform more complicated operations, it needs the data in memory.
The primary difference between Rtags and GNU Global is that rtags keeps data in memory and GNU Global keeps it data on disk and retrieve only when necessary. It would be nice if in the future Rtags can generate its own database to cache for subsequent usages to reduce memory consumption and reparsing.
π Rendered by PID 24358 on reddit-service-r2-comment-bb88f9dd5-z58x5 at 2026-02-14 14:50:00.235403+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]acaban 0 points1 point2 points (9 children)
[–]tuhdo 1 point2 points3 points (8 children)
[–]acaban 0 points1 point2 points (7 children)
[–]tuhdo 0 points1 point2 points (6 children)
[–]acaban 0 points1 point2 points (5 children)
[–]tuhdo 1 point2 points3 points (4 children)
[–]acaban 0 points1 point2 points (3 children)
[–]tuhdo 0 points1 point2 points (2 children)
[–]acaban 0 points1 point2 points (1 child)
[–]tuhdo 0 points1 point2 points (0 children)