Thread: C++ Error message when trying to run

  1. #1
    Registered User
    Join Date
    Aug 2011
    Posts
    6

    C++ Error message when trying to run

    Whenever i try to run this program i wrote an error message pops up that says, "Unable to start program.... The system cannot find the file specified"
    This problem came up when i tried to fix a previous problem by clicking in the top menu, Build->Rebuild Solution.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    That is easy, you should... That will fix the problem.

    It may indeed be the case that someone familiar with the error message can tell you how to fix the problem immediately, but generally it helps if you don't omit parts of the error message that may be important. My guess is that the program was not built and you tried to run the program, so the error message is just telling you that there is no executable file to run.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    For future reference, don't post a new thread everytime you want to continue the conversation. This should have been part of your original thread. That being said, how are you trying to run the program now? In the last thread you were simply running your program in the debug environment by clicking on the 'green arrow'.

    It sounds like now you are trying to run the program from the console window? If that is the case then find it first. Depending on how you setup visual studio, for a debug build it will be somewhere under "C:\Documents and Settings\User\My Documents\Visual Studio 2010\Projects\" <<whatever your project name is>>"\debug"
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

  4. #4
    Registered User
    Join Date
    Aug 2011
    Posts
    6
    Alright well I've tried to find it... but it doesnt seem to exist... I've looked everywhere but there is no file named 'Factoring.exe' (what it should be named). I closed C++ multiple times and reopened it. I was able to then open the project from the main screen by selecting it in the 'Recent Project' spot. But it doesnt run... I file->Save As-> to the folder that its asking it to be in, but when I did that a NEW error message came up. This one takes up the entire work space. It reads:

    To prevent possible data loss before loading the designer, the following errors must be resolved:
    1 Error
    The Field 'C:\Users\Chris\Documents\Visual Studio 2010\Projects\Factoring\Debug\Form1.h' does not support code parsing or generation because it is not contained within a project that supports code.

    What is going on....

  5. #5
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    it is not contained within a project that supports code
    Seems to be explained right there. Your header file is not part of the project?

  6. #6
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    Look, you are going to actually need to sit down and read the helpfile on how to use Visual Studio. I know, it sounds appalling, but that is just the way it is. For future reference questions like these should go into the TECH forum. Just because you are using Microsoft Visual C++, it doesn't mean that this is a programming related issue.

    In fact this is a I don't know how to use my compiler because I am too lazy to read the helpfile issue.
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Huzapro0 View Post
    To prevent possible data loss before loading the designer, the following errors must be resolved:
    1 Error
    The Field 'C:\Users\Chris\Documents\Visual Studio 2010\Projects\Factoring\Debug\Form1.h' does not support code parsing or generation because it is not contained within a project that supports code.
    Mmm, this doesn't sound like C++, either, so it should not go into the C++ section, either.
    Any Windows Forms project isn't C++.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 13
    Last Post: 10-08-2010, 05:35 PM
  2. Why Do I keep Getting this Error Message?
    By Nothing595 in forum C Programming
    Replies: 10
    Last Post: 09-25-2010, 03:24 PM
  3. i get error message
    By AlexFraudriguez in forum C++ Programming
    Replies: 3
    Last Post: 04-09-2009, 09:04 PM
  4. error message
    By johnrat in forum C++ Programming
    Replies: 8
    Last Post: 05-30-2007, 10:08 AM