Visual studio fails to create exe file

Rohan 1 Reputation point
2021-01-02T19:40:54.21+00:00

Every time i run a pre-created C++ file it fails to create a exe file and fails to run and a message pops up saying how do you want to open this file (.filename).

If I create a new C++ file and run it.. it runs fine..

can you help me in solving this problem.

Developer technologies C++
{count} votes

1 answer

Sort by: Most helpful
  1. Rohan 1 Reputation point
    2021-01-04T11:55:21.357+00:00

    there was problem in file naming...
    I named it as 1.filename.cpp and hence when the program was compiled it created a file as 1.filename.exe i.e. filename was the extention of the file created....
    When I changed it to 1_filename,cpp, 1_filename.exe was created and program ran successfully.
    Thanks for replying.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.