Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c++]

Questions related to the C++ language or the cc-mode

48
votes
9answers
23k views

Using Emacs as a full-featured C/C++ IDE

I have been trying off and on for over a year now to use Emacs as a C/C++ IDE. I have only been marginally successful thus far, but have run into a few brick walls along the way. Currently I am ...
8
votes
1answer
371 views

formatting constexpr if in c++-mode

I recently started using C++17, which brings constexpr if. This however screws up c++-modes default indentation. // emacs 25.3.2 with --no-init if constexpr (n == 1) { // Why? } else if ...
9
votes
2answers
2k views

Is there a yasnippet producing a prepopulated doxygen comment?

For the following C++ function: bool importantStuff(double a, double b); It should output the following snippet, perhaps without the tags: /** * <Insert description of importantStuff> * * @...
11
votes
3answers
2k views

How can I get C/C++ context-sensitive completion with Company?

Semantic seems to be able to do this, but I cannot get it to work as I would expect it to. For example, if I #include "Type.h" and declare Type t, using semantic-complete-analyze-inline when point is ...
43
votes
6answers
54k views

How to get intelligent auto-completion in C++?

Emacs cannot compete with another other IDE if it doesn’t have an auto completion function. Auto-complete simply makes me a more efficient programmer. I know of the Auto Complete Mode extension, but ...
11
votes
1answer
817 views

Color declared variables

I'm looking for a simple way to make emacs remember of declared variable in a single function in C/C++. By "simple", I mean without any external package, just with some elisp lines in configuration ...
11
votes
1answer
762 views

disable specific warning in flycheck (specifically “#pragma once in main file”)

I'm using flycheck for C++ development, and get the following warning: #pragma once in main file In all headers included in a main file. Searching the webs, I get the impression this has something ...
7
votes
2answers
3k views

Class Browsing in C++

I'm working with a large codebase and often find it to be tedious and hard to understand class relationships. I found the following wiki that describes various tools for working with OOP in C++, but ...
4
votes
2answers
664 views

CC-Mode - Javadoc Comment Colors in C/C++

I've been fiddling around a bit with CC-mode lately and figured that since I prefer to comment my functions/classes with javadoc-like syntax, I'd like to use the built-in comment highlighting provided ...
11
votes
2answers
849 views

Display the beginning of a scope when it is out of screen

I would like to display the opening part of a scope when this one get out of screen. Example: namespace a { ... --------------------- <- display frame ... | }* ...
6
votes
2answers
914 views

Change the way CC-mode font-lock the C++11 `auto` syntax

With C++11, the keyword auto attained a new syntax and semantics. However, it seems that CC-mode has not been aware of this. For example, if I write auto var = exp, I get var in green, in which ...
2
votes
1answer
1k views

Enlarge font size of function names in source code like Source Insight

Source Insight can show function names in a larger font. Can Emacs display function names with a larger font and different color?
1
vote
2answers
758 views

Binding compile command to a key for c++ code

Is it possible to bind the compile and run commands for a c++ code to a single key (for example F5). What i do at the moment is to run M-x compile and then as compile command g++ project.cpp and then ...
0
votes
2answers
2k views

Configuring yasnippet and autocomplete to work with C/C++ headers

My computer system and set up are OS: Arch Linux 64bit emacs version: 24.4 alias emacs='emacsclient -t -s server --alternate-editor=' Update: auto complete is working with yasnippet occasionally ...