Are you new to programming or Visual C++? Have you ever wondered what the compiler errors in the output pane mean? If you answered yes to either of these questions, I wrote this for you.
When you build a program, you hope to see this in the output pane.
Code:
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
If you see
0 succeeded and
some number other than zero (0) failed, there is an error in the code which caused the program to fail to compile. Scrolling up to the first error listed you will find a description and an error code in the general format of
Cxxxx, where
xxxx is a number. (Ignore errors listed after the first one because subsequent errors may be caused by the first one.)
Many times the description provides enough information to make corrections. If not, the meaning of the error code is necessary. Included here are four options which can be used to to obtain information on the error code.
- Use the Help feature of the IDE.
- Click Help.
- Click View Help.
- Using the same technique that is used to expand folders in Windows Explorer (not Internet Explorer), expand the listings in the left pane as follows to create the path to the error you need information about.
Code:
Visual Studio 2010> Visual Studio> Visual Studio Languages> Visual C++> Building a C/C++ Program> C/C++ Building Reference> C/C++ Build Errors
- In the left pane, find the group which contains your error number.
- Click on it.
- In the right pane, click on your error number. (Scroll if necessary to find your number.)
- Click on your error number to display information.
- If you have a browser open, one way is to paste or type msdn.microsoft.com/en-us/library/8x5x43k7 into the address bar of your browser.
- Look in the left pane to find the group which contains your error number.
- Click on it.
- In the right pane, click on your error number. (Scroll if necessary to find your number.)
- Click on your error number to display information.
- Google the compiler error. I am not real fond of this option. The very nature of a Google serach will give many hits. Many of them will not give you a clear description of your error. You must be very specific in the wording of your search query to obtain the information which will be helpful.
- The last method I will discuss here is the one I prefer. I am probably in a minority in the use of this method; therefore, I am giving my reasoning for using this method. I use my laptop exclusively for my programming tasks. I am not always where I have a secure Internet connection available. Rather than using a questionable Internet connection, I have downloaded the Help files to my computer. I use these files to find any Help articles I need. I use the same path as listed above to access error code information. The steps to download the files is fairly intuitive. I will provide help upon request to anyone who wishes to receive instructions.
I hope you find this helpful.
drpepper