How to create a project efficiently?

Recently I run into trouble when creating a new project, say, HW 3.4.2. In HW 3.4.2, I need all the source files and header files in HW 3.4.1. The way I do it is: create an empty object HW 3.4.2, create new empty source files and header files.
Then I open all the soure files and header files in HW 3.4.1, copy the code in each file, and paste them in the corresponding files in HW 3.4.2.
Then I need to name those pasted files in the same way as the HW 3.4.1, and move them into the project.
It is really tiring...
I have tried to copy those files in HW 3.4.1 and paste the files in the solution HW 3.4.2, but they don't show up in the folder HW 3.4.2; so I have to paste them in the HW 3.4.2 folder. But when I run it, strange errors may appear especially when there is virtual destructors.
How can I inherit project from a previous one?
Besides, when I accidentally create a project in the wrong place, can I simply move the project folder to another place and which icon shoud I click to get into the project?
Many thanks!!!
 

Attachments

APalley

Well-Known Member
1) Create a new project
2) Copy/paste the existing files into the new project's folder in windows explorer
3) Add existing files in solution explorer
 

Xinran Zhang

Member
C++ Student
1) Create a new project
2) Copy/paste the existing files into the new project's folder in windows explorer
3) Add existing files in solution explorer
Hi,@APalley I might have generated all my projects in the wrong way. I finished all my exercises on this level by copying the entire project of the first exercise and changed some codes in it. And now I find out that although I can change the name of the "Microsoft Visual Studio Solution (.sln)", while I cannot change the name of the accompanying folder (which I am supposed to upload) and the .vcxproj in it are all in the wrong name. Are there any ways I can rename them? Or do I need to regenerate them to avoid losing points for this level? Thanks!

43cb97d7631f2ef28cf9e027565daf6.png
dbd29a5f78d0f14f89e175ce2ea286f.png
 

GONG CHEN

Well-Known Member
C++ Student
Hi,@APalley I might have generated all my projects in the wrong way. I finished all my exercises on this level by copying the entire project of the first exercise and changed some codes in it. And now I find out that although I can change the name of the "Microsoft Visual Studio Solution (.sln)", while I cannot change the name of the accompanying folder (which I am supposed to upload) and the .vcxproj in it are all in the wrong name. Are there any ways I can rename them? Or do I need to regenerate them to avoid losing points for this level? Thanks!

View attachment 30550View attachment 30551
May be easier to regenerate them.
 
Top