Loading
submit to reddit
May 25, 2013, 02:31:09 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome!
 
   Forum Home   Help Search Forum Login Register  
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Error running any code, stuck on lesson 1  (Read 804 times)
fredark
Newbie
*
Posts: 3


« on: August 12, 2011, 12:03:21 AM »

I have no experience what-so-ever with programing. I am running windows 7 32 bit. I followed your exact steps in lesson 1 as well as lesson 2 and another outside source (just to check if it always happened) and I always get the error message:

Unable to start program 'c:users\fred\documents\visual studio 2010\Projects\lesson 1\Debug\lesson1.exe'.
The system cannot find the file specified.

What is my problem and how can I fix it?
Thanks
« Last Edit: August 12, 2011, 12:34:18 AM by fredark » Logged
Michael Hall
Administrator
Hero Member
*****
Posts: 903



« Reply #1 on: August 12, 2011, 12:50:15 AM »

You probably didn't follow the directions precisely. This usually happens when you add the code file "main.cpp" incorrectly. Be sure to use the "Project"->"Add New Item" method. My guess is that you added it under the "File" menu, which means that the code won't be compiled (it's very understandable why you might do that). Try that and let me know how it turns out.

Mike
« Last Edit: August 12, 2011, 10:03:08 AM by Michael Hall » Logged
fredark
Newbie
*
Posts: 3


« Reply #2 on: August 12, 2011, 10:17:01 AM »

Haha I wouldn't make that simple of a mistake. But just to make certain I redid the entire project very carefully and it still didn't work. It gives the same error as before. But in the code, the "end1" in line 4 is underlined giving the error:

Error: namespace "std" has no member "end1"

It suggested making end1 into just end, but that didn't work either. Is this the problem or is it still something else?
Logged
Michael Hall
Administrator
Hero Member
*****
Posts: 903



« Reply #3 on: August 12, 2011, 10:21:29 AM »

Oh, then the problem is much easier. Change the "1" to an "l". That's "endl" not "end1". This is short for endline. That should fix it.

Mike
Logged
fredark
Newbie
*
Posts: 3


« Reply #4 on: August 12, 2011, 10:24:22 AM »

OOHHH! I feel stupid now. Thanks for the help!
Logged
Michael Hall
Administrator
Hero Member
*****
Posts: 903



« Reply #5 on: August 12, 2011, 11:09:07 AM »

You're welcome. For future reference, we have a downloadable project for that lesson with the code, and we have the code on the lesson page so that you can copy it as well. We have downloadable projects for the lessons that cover our longer programs too (the links are on the right side of the videos on the lesson pages). Good luck and please let me know if you run into any other problems.

Mike
Logged
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!