Reputation:
Currently working my way through Bjarne Stroustrup's "Programming: Principles and Practice using C++". For the majority of the book (up to the twelfth chapter) every exercise and given example code uses the "std_lib_facilities.h" file.
My issue when creating a new project is that every time I want to start coding a program to understand how a bit of the code works I have to add the file to the header files part of the project AND then find the file on my system and copy a version of it to my project directory.
Is there a way to get VS Express 2013 to copy a file into your project directory when you use the "add existing item" option? Or as an alternative is there any way to get the IDE to include the .h file in every new project?
Upvotes: 3
Views: 88
Reputation: 11957
You can create a project template.
First thing, create a new project, as normal. Import the file into your project. Add the #include
to the Class1.cpp.
Now go to File -> Export Template. Select Project Template. Select your project in the dropdown. Click Next, give it a nice name, and click Finish.
Now when you create a new project you can select your template, and it will be ready to go!
http://msdn.microsoft.com/en-us/library/vstudio/xkh1wxd8(v=vs.120).aspx
Upvotes: 4