Lỗi the system cannot find the file specified trong c++

-

I am having a similar issue as this post. However, on build I have 0 errors, 0 warning, & 0 messages.

Bạn đang xem: Lỗi the system cannot find the file specified trong c++

I took a look at Project -> Properties but I bởi vì not seem to have a linker option (which appears to be a typical fix that others have used khổng lồ solve this issue).

I have also tried Rebuilding Solution & then running but that does not seem to lớn work either...

*

Based on the aforementioned similar issue I underst& the premise that "when an exe cộ cannot be created (or in my case - found)... then naturally it cannot be run as it does not exist". However, I bởi vì not understvà where the disconnect is occurring that is preventing this tệp tin from either being found or created...

Any help sorting this out would be greatly appreciated. Cheers.

Xem thêm: Fix Lỗi Không Tạo Được New Folder Win 7, Không Tạo Được New Folder Win 7

*


c++
codeideerror2.png (64.4 KiB)
codeideerror.png (76.5 KiB)
Comment
Comment · Show 1
Comment
5 |1600 characters needed characters left characters exceeded
▼ Toggle Comment visibility. Current Visibility: Visible lớn all users

Attachments: Up to lớn 10 attachments (including images) can be used with a maximum of 3.0 MiB each & 30.0 MiB total.


*
SimpleSamples · Jul 18, 2021 at 05:08 PM

I am not sure what directory the main.cpp file is in but you can right-cliông xã Source File in the Solution Explorer then select "Add.." then "existing Item" then add main.cpp. In the future you can create a C++ project in the same way you did but then you can right-clichồng Source File in the Solution Explorer then select "Add.." then "new Item" and that will create an empty cpp file.


1 Vote 1 ·

2 Answers



Clichồng lớn vote 2 Votes" 2 Cliông xã lớn down vote
Viorel-1 answered • Jul 18, "21 | Viorel-1 edited • Jul 18, "21

It seems that you created an empty project và main.cpp is not included into lớn project.

Try creating a new “Console App” project, check that it runs, then add your code. It is possible lớn add existing files too.


Comment
Comment Show 0
Comment
5 |1600 characters needed characters left characters exceeded
▼ Toggle Comment visibility. Current Visibility: Visible khổng lồ all users

Attachments: Up lớn 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


*

Cliông chồng lớn vote 0 Votes" 0 Cliông xã to lớn down vote
IsaacTait-9448 answered • Jul 18, "21

When I created the project I went to lớn File -> New -> File instead of the way
SimpleSamples suggested. Here is some documentation on how to vì chưng it correctly (both for myself và for anyone else who comes across this in the future). Thank you
Viorel-1 for pointing out my error. I am getting it sorted out now. Cheers!


Comment
Comment Show 0
Comment
5 |1600 characters needed characters left characters exceeded
▼ Toggle Comment visibility. Current Visibility: Visible to all users

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


question details


8 people are following this question.


*
*
*
*
*
*

Answers Subscribe to Answers Answers and Comments Subscribe to Comments and Answers

Related Questions


MFC C++ application: how to lớn clear command line arguments in Task Manager?