Home > Articles > Programming > C/C++
Azure DevOps. Azure DevOps Server (TFS) 0. Stdafx.h and pch.h. Visual studio 2019 version 16.2 windows 10.0. Jaden Yip reported Aug 28, 2019 at 07:43 PM. Show comments 6. Add comment 10 40000 characters. Stdafx.h is a file, generated by Microsoft Visual Studio IDE wizards, that describes both standard system and project specific include files that are used frequently but hardly ever change. Compatible compilers (for example, Visual C 6.0 and newer) will precompile this file to reduce overall compile times.
I’m going to assume at first that you’re using Microsoft Visual Studio, Community Edition. This includes an excellent C++ compiler—it’s powerful, fast, and has nearly all of the up-to-date features. However, the Microsoft compiler raises some special issues, and one of the purposes of this chapter is to acquaint you with those issues so you can successfully use C++.
If you’re not using this compiler, skip ahead to the section, “If You’re Not Using Microsoft.”
I’ll get into the more abstract aspects of C++ later, but first let’s get that compiler installed.
Even if you have an older version of Microsoft Visual Studio, you should consider updating to the current Community Edition, because it has nearly all the up-to-date features presented in this book. If you’re already running Enterprise Edition, congratulations, but make sure it’s up to date.
Here are the steps for installing Microsoft Visual Studio Community Edition:
Double click the file vc_community. This launches the installation program. The following screen appears:
(PACI) franchises Precision Tune Auto Care centers through Precision Franchising LLC (PFL). Fast Facts about Precision Tune Auto Care’s parent company.Company NamePrecision Auto Care, Inc.Corporate Office748 Miller Drive, SE, Suite G-1Leesburg, VA 20175800.GET.TUNE (800.438.8863)703.777.9095DescriptionPrecision Auto Care, Inc.
Used with permission from Microsoft.
If all goes well, Microsoft Visual Studio, which includes the Microsoft C++ compiler, should be installed on your computer, and you’re ready to start programming. First, however, you need to create a project.
Hi, friends!
So, I'm making the jump from console C++ to Windows programs, and actually having a lot of fun with that! But my method is, to use my Beginner's edition VC++ to compose the program, and when it's 'done', I switch to the free Bloodshed Dev C++ compiler (because the VC always puts that annoying dialog box you have to dismiss before the program will run, the one that says you can't release your program to the public, end-user-liscence blah,blah).
Usually, I manage OK with finishing a project in Dev that started in VC, but this time I have a dialog-based program that includes <stdafx.h>, which in turn includes five other afx*.h files, too.
Dev C++ throws a fit about this. Even after I copied every relevent header over to the Dev C++'s Include directory, it STILL complains that it can't find the headers!
Clue #1: This application used MFC wizard alot while it was a Microsoft project. Handy for adding all those bells and whistles, but does that doom it as far as Dev C++ is concerned?
Clue #2: I have noticed multiple repeat includes in different files of the project. Microsoft seemed happy with that, and I assumed everything was guarded by #ifndef statements. But do they only work for Visual C++?
Someone told me once, 'Just wait until you get linker errors!' I see what he was talking about, now..