Hey guys im on windows 10, and also new to coding. Ive recently downloaded both 2015 and 2017 visual studio with every c++ related package installed, and whenever i compile my code the exe. never opens up. I've made sure that the project>properties were in check ,and i've made sure that there were no bugs at all. Not only that, ive tried reinstalling the program as well, but still no luck. Just a few minutes ago, i went through my program
files>documents>visualstudio2017>project>"name of project">release>
which lead to an exe. file with the name of my project, and i made a copy of it onto my desktop. After going through the properties of the file on my desktop, i came upon the compatibility tab and apparently both 2015 and 2017 are only compatible with windows 8 or older. Now, i do not know if this is the underlying issue, but any suggestion of what the problem may be or how to fix it would be greatly appreciated! Thanks
Sounds strange. I doubt whether you have a compatibilty problem with W10. Have you tried opening the exe file with the command prompt. Also, check the exe file size and that the one you need is not the one in the Debug folder.
OK, nothing too serious there if that's the only problem. If a file isn't found you're looking in the wrong spot if in fact you know it's 'somewhere'.
So what you need to do is either type in the command prompt the full file path, or open the command box in the same directory as the exe file. (BTW I would use the exe files in the Debug/Release folders and not transfer to the Desktop even though that shouldn't explain why nothings happening.
(VS/windows is a pain with this so you aren't alone.)
kemort's answers are good, but I will try to explain it differently.
I have been using W10 and VS 2015 for almost a year now and what I have found is that when you first start working on a program in Debug mode files are used or created in the sub directory of "...\Projects\Project Name\Project Name\File Name.txt" The "..." represent "C:\Users\Owner\Documents\Visual Studio 2015\" on my system your path may be a little different or not.
Now when you create a "Release" version of the program VS puts the "*.exe" file in the release directory. When that program is run it is looking for files in the "Release" directory and not finding them there. When the ".exe" is created for "Release" you will need a relative path to your files like "..\Project Name\File Name.txt". You could copy files to the "Release" directory, but it is easy to get confused on which file has been changed especially if you switch back to "Debug" mode.
As for putting something on the Desktop I have had no problem creating a shortcut to the program on the Desktop. Once you have the path correct it works fine,