Add folders in a visual c++ project

前端 未结 2 1540
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-21 04:21

How can I add whole folder and its subdirectories in a visual c++ project? I am using visual studio 2010 professional. I mean you can add files by using Add Existing I

相关标签:
2条回答
  • 2020-12-21 04:27

    Ask more precisely, what you want to do? if you want to open a file within that folder you can use:

    FILE *p;
    p=fopen(FILEPATH,OPENINGMODE);
    fclose(p);
    
    0 讨论(0)
  • 2020-12-21 04:28

    The quickest way that I know of is to

    • add the folder to your project file directory using Windows Explorer
    • find the folder in Solution Explorer (make sure Show All Files is checked)
    • right click on the folder and select Include In Project

    You may have to do the folder and the files separately, but you can select multiple files at once.

    0 讨论(0)
提交回复
热议问题