Questions tagged [c++]

C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. Programming questions are off-topic and should be asked at http://stackoverflow.com/

[Above excerpt quoted from Wikipedia.]

New to C++?

Welcome! Whether you are new to programming or are coming to C++ from another programming language, it is highly recommended to have a good book from which to learn the language.

If you are looking for a good compiler, g++ is the most commonly used compiler on Linux and other platforms, while Microsoft Visual C++ is the most commonly used compiler on Windows. We also have a list of toolsets.

Join us in chat, where we discuss C++, programming in general, and even other stuff when boredom creeps in. Don't forget your sense of humor, but keep it civilized.

C++0x

The language standard has remained pretty much the same for a long time, but the new standard C++0x has now been defined. Rather than a "big bang" approach, it is being rolled out gradually as compilers are supporting the new language features. See the C++0x FAQ to see what is new in the language, and check your own compilers FAQs to see which of those features are currently supported.

Have a Question?

Programming questions are off-topic and should be asked at http://stackoverflow.com/. When you ask a question, be sure to include any relevant source code. Try to keep the code as minimalist as possible while still reproducing the problem; often the problem will be found during the process. Try to make sure that the source code compiles, if possible. However, if there are any compiler errors, be sure to indicate:

  • which compiler you are using
  • exactly what the errors are
  • on which lines they occur (mark the lines with comments)

Stack Overflow's C++ FAQ

Stack Overflow has recently started an effort to create a list of frequently asked C++ questions. You can reach them using the [c++-faq] tag on Stack Overflow.

External FAQs

On C++0x

Other External Resources

Third party code

General Posts

389 questions
30
votes
2 answers

Where do I get make for cygwin?

I need binary file.
notifyroy
27
votes
3 answers

Which versions of C++ redistributables can I remove?

I have a number of Microsoft Visual C++ 2005 and 2008 Redistributable and I would like to know which ones are safe to remove, because there are actually more than 10 installed on my computers. Microsoft Visual C++ 2005 ATL Update kb973923 - x64…
Marnix
  • 759
19
votes
3 answers

How can I virtualize an ARM machine in Windows?

I'm interested in developing some programs that use OpenCV, but I want them to run on an ARM environment. Can I virtualize the ARM under a Windows environment with VMWare or VirtualBox or something?
edsonlp1
  • 409
19
votes
3 answers

How can I let TextMate show line numbers when I'm coding C++?

How can I let TextMate show line numbers when I'm coding C++?
Don Lun
  • 293
16
votes
4 answers

Command line tool to format C++ code on Ubuntu

Is there any command line tool which can be used to beautify C++ file on Ubuntu? If yes, can you please suggest one?
michael
  • 6,215
15
votes
1 answer

emacs -- C/C++ jump to beginning of containing block

While editing C or C++ files in emacs, I'd like to be able to go to the beginning of the containing block of code. I was expecting to find a c-beginning-of-block function, but alas, no such function exists (to my knowledge). For example, I might be…
mgalgs
  • 2,472
14
votes
2 answers

How do I un-indent code?

I occasionally realise that I need to remove one level of indentation when coding (such as moving code out of loop). The problem is I end up with a bunch of lines all indented more than I want it to be and the only way to indent it the way I want is…
shortstheory
  • 347
  • 1
  • 3
  • 15
14
votes
4 answers

Do I need both x64 and x86 versions of the C++ redist

If I have both the x64 and the x86 version of a Microsoft C++ Redist package, can I uninstall the x86 version? If I did uninstall the x86 version, would the x64 version cover the dependencies on the x86 package?
h313
  • 296
14
votes
7 answers

How to cause a BSOD on Windows XP and newer versions?

Is there a way to programmatically cause a BSOD on Windows XP and newer versions? How? BTW just to clarify, this is not for malicious purposes. The client requested to be able to shut down/reboot a terminal on their LAN this way. When I asked why,…
10
votes
4 answers

How Do I run Visual C++ 6 IDE on Windows Vista or higher?

Visual C++ 6 is crashing when opening a project or using the "open" file menu, how can I 'force' VC++6 to work under windows 7 without a Windows XP emulator / virtual machine / Windows XP Mode?
user144773
9
votes
5 answers

How to test if gcc is installed?

How can I find out if I have gcc installed on my machine? I am trying to run CodeRunner, but it isn't responding. I know you have to have gcc installed in order for it to work properly. I do have Xcode 4.0.2 installed (from what I've read, if Xcode…
willis0924
9
votes
3 answers

Why can't I view and edit c_cpp_properties.json in vscode?

https://code.visualstudio.com/docs/cpp/config-msvc I'm trying to use VS Code to compile and run c++ using these instructions. While completing this step Start typing "C/C++" and then choose Edit Configurations from the list of suggestions. VS…
Ryan Marr
  • 103
9
votes
2 answers

Installing libraries and header files under Ubuntu Linux for C/C++ development

I have to admit that I feel completely lost each time I have to fulfill the dependencies of some C or C++ code. Currently, I'm on Ubuntu 9.10 (Karmic Koala), but I remember the same feeling of forlornness from Windows. I really think that I do…
8
votes
9 answers

How can I recover source overwritten by a bad compile command?

I had written a source code of C++ and complied it with the same name using the following command line. For example: c++ source-code.cpp -o source-code.cpp Now my source code has been replaced by the executable program.Is there any way to retrieve…
Pavitar
  • 461
7
votes
1 answer

Where is Cordbg?

I'm trying to debug a C++ application recently ported from linux, and I'm used to a command-line debugger. I'm not using Visual Studio, rather NMake Makefiles. I hear cordbg.exe is a command line debugger I should have, but I can't find it. I'm…
1
2 3
25 26