Quickly jump to StarCraft, which is the main reason for using C++ in the first place. It's recommended to have two compiler suites under Windows: Visual Studio and gcc; the latter can be installed using mingw.
- NCSU Library electronic resource: Effective C++.
Not everyone wants or needs to use a managed code environment, and C++ doesn't seem to be going away any time soon. Why in such a rush? Teach Yourself Programming in Ten Years.
- C++ FAQ
- C++ Language Tutorial. This is pretty good.
- The Intel C++ Compiler requires the Microsoft Platform SDK during installation. Since this requires Visual Studio, you might as well just use the Microsoft compiler instead.
- Standard Template Library Programmer's Guide (STL)
- Google CPP Style Guide
- Explanation on Pointers vs. References, which still confuses me to this day.
warning: auto-importing has been activated without --enable-auto-import specified on the command line.
Can use (Why does it happen?):
Visual Studio 2010 (and 2008)
- Productivity Power Tools, to allow you to add a ruler at 80 columns.
- Visual studio 2010 exiting after program ends (Stack Overflow)
- Basic console problem
In previous versions of Visual Studio,
CTRL + F5 (Start Without Debugging) would pause a command-line application with "Press any key to continue". It appears that this no longer happens automatically with Visual Studio 2010.
Most sources on the web will tell you to change your subsystem, but that doesn't really mean much. Here's a better set of instructions:
- . Right-click on your Project Name.
- . Select Properties.
- . Choose Configuration Properties >Linker > System.
- . For the Subsystem property, click the drop-down box.
- . Select Console (
Now the console will pause with "Press any key to continue . . ."
- When copying (replicating) a project, you need to change the
GUID. You can do this by manually editing the
vcprojfile and removing the
ProjectGUIDIt will get generated automatically on next load.
- You can use Visual Assist X to drastically improve productivity within Visual Studio when working with C++ projects. Unfortunately, even the academic pricing is somewhat expensive. Also, I'm running into the same redraw bug as some other people.
- It is convenient to be able to copy DLLs to the output folder after building the project. You can do this with Pre/Post-Build Events. See MSDN on how to specify build events.
- MinGW, the Minimalist GNU for Windows. The recommended installation approach is to use the command-line automated installer. Then, see Getting Started. nuwen.net has a slightly updated build of MinGW.
c:\MinGW\bin>mingw-get.exe install gcc mingw-get.exe: *** WARNING *** c:\MinGW\var/lib/mingw-get/data/profile.xml: user configuration file missing
defaults.xml and just copy it over to
profile.xml (see this Google Doc). This will get rid of the annoying warning.
- Boost C++ Libraries. The easiest way of getting started on Visual Studio is to use the free Boost Pro installer. This requires an Internet connection while running the installer. Also, I think Python is going to make headway due to Boost.Python.
- How to Build a Project that Uses Boost. Mainly look at the information on adding additional includes.
- Boost Library Documentation
Compiling from the Command Line
- * Visual Studio 2010 Command-Line. To compile:
cl /EHsc basic.cpp
C++ Primer Plus, 5th Edition by Stephen Prata
The book home page. Most people don't recommend this book.
I haven't found an official errata for this, but here is mine:
- p. 115 (Chapter 4: Compound Types) says
char bird = "Mr. Cheeps";. This should instead be
char bird = "Mr. Cheeps". The characters can't fit otherwise once you include the implicit
Accelerated C++ by Andrew Koenig and Barbara E. Moo
This book seems to be more highly recommended. The home page is here. NCSU library has this.
#pragma onceis not a standard, but most compilers support it. Use it when possible.
- In addition, use forward declarations (rather than header files) whenever possible.
- Why in the declaration of an iterator with C++ is necessary the scope operator "::"?. Unfortunately, the answers to this question are still useless, but here is a better answer.
- Why isn't typename needed in Visual Studio? This behavior is non-conforming. Find information on two-phase lookup.
- Pass by reference. See also: Enough Rope to Hang Yourself.
- Where did WIN32_LEAN_AND_MEAN come from?
Visual Studio 2008 Express
Visual Studio 2008 Service Pack 1
An earlier version of Microsoft Visual Studio 2008 has been detected on the system that must be updated to SP1 before installation can proceed.
- Possible registry hack for correcting this issue; the other posts no good. Indicates a problem in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vs\Servicing\9.0. Key is definitely removed on uninstall. Once we determine that the registry key is the problem, lots of links start popping up. Manually installing Visual Studio 2008 SP1 appears to fix the problem.
- Visual Studio 2008 Service Pack Preparation Tool
Including a DLL when Debugging
- You probably want to do this so that you can integrate with Lua.