Questions tagged [c++]

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

154 questions
14
votes
1 answer

Best C++ indexer?

I've recently switched over from Eclipse CDT to Spacemacs with the C++ layer as my development environment. So far... awesome! However, one of the things I miss about Eclipse is its indexer. At the moment I'm using GNU Global with the gtags layer.…
Steve Lorimer
  • 565
  • 4
  • 13
5
votes
1 answer

Displaying the type of variable in C++ code with cursor

It has been difficult to see immediately the types of variables in C++ codes because they are defined using 'auto', 'template' and 'decltype'. If you use IDE, you can detect the type after the compilation by being a cursor on the variable. My…
2
votes
1 answer

autofill a cpp file based on the .h file

suppose I have x.h class X { void f(); void g(); } in x.cpp #include "x.h" can I just entry a command with "X" as a parameter, then I can get void X::f() {} void X::g() {}
zhihuifan
  • 165
  • 4
2
votes
1 answer

how to call a c++ function from elisp

initially, i'am new to emacs. So I have little expierience with emacs. In past I used Visual Basic or VBA to work with the Output from some .dll. Now I'am working a little with emacs/elisp. My question is, is it possible to use emacs to call a…
tellence
  • 21
  • 2
2
votes
1 answer

Writing C++ (or other) code using lisp

I was wondering if are existing tools or package to write C++ (or other langage) code from lisp. For example, this afternoon I needed to create 4 basic classes: class D{ public: D(){ } }; class C{ public: …
wizmer
  • 917
  • 1
  • 7
  • 9
1
vote
1 answer

Different indentation in files with same modes

My .cxx files have 8-character indentation, while .cpp files have 4-character one. They have exact same modes enabled: My auto-mode-alist has the following c++ lines: ("\\.ii\\'" . c++-mode) ("\\.h\\'" . c-or-c++-mode) ("\\.c\\'" . c-mode) …
honey_badger
  • 181
  • 2
  • 8
1
vote
2 answers

`M-x` compile always runs the same command

I'm a very new user (~ 2 days) to Emacs. I switched from vim, because it wasn't working for me. I'm learning C++ and I've run into this issue when I write M-x compile. Upon writing this command, emacs always runs make -k on my small test program.…
0
votes
0 answers

Emacs moves curly braces -- how to stop

I have the "bsd" style selected for C++ programming but when I go to define a function and enter the curly braces on the new line this happens: Press RET Is there any way to stop this behaviour so that I end up with this instead: Update 1 I…