So I just started a course and wanted some general help and understanding.
when I run a file to test it for errors I trip up an error.
' "c:\Projects\Con........exe"' is not recognized as an internal or external command, operable program or batch file.
Im assuming thats just cause the code makes no sense?
im set for fixing up this code to make it run, with deleting nothing.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/* This is a program with some
errors in it to be corrected */
#include <iostream>
usingnamespace std;
int main()
{
integer a;
floating_point b;
character c;
cout << a << b << c;
return 0;
}
What IDE are you using? When I was using Visual C++ Express 2010 I kept getting that error and another one saying the .exe didn't exist regardless of whether the code was correct or not. I believe at first it said the .exe couldn't be found, then when I clicked build it said it built without errors but Then when I tried to run the program I kept getting the error you are getting.
You should try running a program you know is correct and see if you still get that error.
i ran a code that was correct and it was fine, problem is I think my antivirus locked that exe open, so disabling my antivirus i think solved it. Gonna keep poking at the code till its working before I blame the program first. Visual 2013 express btw.
I'm also using 2013 Express and when I run your code I just get the errors from the code being incorrect. I'm not sure why your antivirus would cause it though.
You also need to initialize the values to something. You can do that by either adding =(insert number or letter here) after each variable like above, or you can use cin statements to take input like below...
1 2 3 4 5 6
cout << "Enter a number: ";
cin >> a;
cout << "Enter another number: ";
cin >> b;
cout << "Enter a letter: ";
cin >> c;
You aren't initialized a, b and c, but there is something else. I have one near problem with my studio. I solved it when i start compile with win32 (from new project, Win32 Concsole Application) and use this -> #include "stdafx.h".
Think, this will help. :)