question

AshaDiggi-2801 avatar image
0 Votes"
AshaDiggi-2801 asked AshaDiggi-2801 commented

cannot open include file 'new.h': no such file or directory

Hi All,

I am trying to run a simple mfc demo application in visual studio 2015, but i am not able to build that one successfully.

getting a error message "cannot open include file: 'new.h' : no such file or directory.

can any one please suggest me, what I am doing wrong,how to solve this error.

With Regards,
Asha.S.D

c++
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RLWA32-6355 avatar image
0 Votes"
RLWA32-6355 answered

You probably want to use #include <new>

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

rupeshshukla-4529 avatar image
0 Votes"
rupeshshukla-4529 answered

Make sure that you have proper include file path listed in your solution for new.h. Search for new.h on your disk and add the file path to your include .You can find it either in your Windows Kits or Visual studio folder. Once you had added it then try to recompile your solution.

Thanks

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JeanineZhang-MSFT avatar image
0 Votes"
JeanineZhang-MSFT answered AshaDiggi-2801 commented

Hi,

The new.h lives in the SDK folder(e.g. C:\Program Files (x86)\Windows Kits\10\Include\10.x.x.x\ucrt).I suggest you should try to change "Windows SDK version" in project settings, and select the latest "10.x.x.x" version available from the drop-down list.

Best Regards,

Jeanine


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AshaDiggi-2801

May I know if you have got any chance to check my answer? I am glad to help if you have any other questions.

0 Votes 0 ·

Hello Sir,

Thank you for the response ,

I just re-installed the visual studio it's working fine.

-Asha.

0 Votes 0 ·