Debugging

Today i've just started to program in C++, and i made my very first project following the C++ Tutorial, so I wrote this in a new project i named "Tutorial" which is a win32 project:

// my first program in C++

#include <iostream>
using namespace std;

int main ()
{
cout << "Hello World!";
return 0;
}

When i try to run it it an error screen shows me this:

Unable to start program 'C:\Documents and Settings\Markus\My Documents\Visual Studio 2010\Projects\Tutorial\Debug\Tutorial.exe'.

The system cannot find the file specified



So... idk what should i do, maybe some of u guys have had this problem before so maybe someone could help me with this issue, so, if someone had this problem when starting to program, plz tell me what u did, thx!
You did build the application, correct? If you did, try going to Project -> Rebuild All (or) Rebuild Solution
Welcome to the world of visual studio! where everything's really hard to do until you explore the IDE enough.

Rebuilding will solve your issue.

My two favorite hotkeys in the world: F7, then F5.
In Visual Studio, when you're done with some code, press F7 to build/compile it all, then F5 to run your program.
Ok... I tried both things u guys told me, and even with different projects, but they dont seem to work, i press F7 and then F5 but it says the same error, and i rebuilded All and Rebuilded Solution, but the same error appears. U guys know what might be causing this problem? Thx
Ok, i think i know what might be happening and i got how to repair it. I created a new project, and it had a code which looke like this:


// Lol2.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"


int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}


With that code, i Build the solution of it, and it created the file, and now i could erase that code, and put mine, and it would run properly, nice!
Don't make a Win32 Project. Make an empty project.
Topic archived. No new replies allowed.