Recommended Configuration Options
Visual Studio includes a mind-boggling number of configuration options.

Here are four settings that I find most helpful, especially for those who are just getting started with coding. All except the last remain in effect across different projects; the last needs to be set for each new project.
- Turn on Line Numbers
- Tools menu > Options… > Text Editor > C/C++ > General
- Ensure that the box labeled “Line numbers” is checked.
- This is now enabled by default in the most recent versions of Visual Studio.
- Convert Tabs to Spaces
- Tools menu > Options… > Text Editor > C/C++ > Tabs
- Set tab and indent sizes both to four, and select “Insert spaces”.
- Tab characters can cause your neatly-formatted code to look misaligned in other editors. Modern style guides for various languages often recommend that spaces always be used for indenting and alignment of code, rather than tabs. You won't lose the ability to indent code using the tab key with this option, but it will cause spaces to be inserted instead of tabs.
- Disable IntelliSense
- Tools menu > Options… > Text Editor > C/C++ > Advanced
- Set “Disable IntelliSense” to True.
You're smarter than your computer, but writing programs still requires an enormous amount of careful attention to details. The IntelliSense feature is kind of like “spell check” for your source code. That sounds great, but I strongly encourage you to disable this feature.
When you're first learning to code, IntelliSense seems like it will help save time and ensure that you type everything correctly. My experience is the opposite. Just like there are probably words that you still don't know how to spell, because you depend on those red wavy underlines in your word processor, IntelliSense can promote similar gaps in your knowledge. The compiler will still catch typos and syntax errors when you attempt to run your programs, but without IntelliSense turned on, you'll be forced to think more carefully while you're typing rather than expecting those red wavy lines to do the thinking for you — and you'll become a better coder as a result.
- Treat Warnings as Errors
- Debug menu > ‘Project Name’ Properties… > Configuration Properties > C/C++ > General
- Set “Treat Warnings as Errors” to Yes.
- [Note: The name of the “‘Project Name’ Properties…” menu item changes depending on the name of your project, but will be the last item in the menu. You also will not be offered the C/C++ properties option unless you have already added a C++ source code file to your project.]
Warnings are things in your program that the compiler has flagged as suspicious, even though the code is syntactically correct. These can be as benign as declaring a variable that you never use, but often point to more serious problems with your code.
Beginning programmers often blow past such warnings like a yellow traffic light in Sacramento, with mental assurances that “it's just a warning.” I instead want you to think about them in the same way you would a sign that says, “WARNING! Dangerous tiger on the loose!”
Don't get bit! Warnings are frequently a source of lost points on assignments, as they often point to problems that might not be readily apparent, but can sometimes be exposed with just the right set of inputs. This option will force you to eliminate all warnings in your code by instead treating them as errors.