#include <stdio.h>
#include <iostream.h>
int main(int arg, char* pszArgs[])
{
//input first argument...
int arg1;
cout << "Enter arg1: ";
cin >> arg1;
//...and the second
int arg2;
cout<< "Enter arg2: ";
cin >> arg2;
//now decide what to do:
if (arg1 > arg2)
{
cout<< "argument 1 is greater than argument 2\n";
}
else
{
cout <<"argument 1 is not greater than argument 2\n";
}
return 0;
}
I click COMPILE and i get Error spawning cl.exe! What am I doing wrong?
[edited by - Stormrage on June 16, 2003 5:01:17 PM]
Error spawning cl.exe?!
Never before have I encountered this error. I guess thats because I'm new to programming though. I'm doing the exercise for Chapter 5: Controlling Program Flow in C++ For Dummies. Here is the code in the book:
Well, it definitely isn''t a problem with your code. cl.exe is the compiler that MSVC++ uses.
It sounds like your installation is somehow corrupted. If I were you, I would uninstall MSVC++, then reinstall it from the installation CDs.
How appropriate. You fight like a cow.
It sounds like your installation is somehow corrupted. If I were you, I would uninstall MSVC++, then reinstall it from the installation CDs.
How appropriate. You fight like a cow.
It happens ocasionally. Try a build clean, or making a new project; rebooting often works too.
Had this error ... it will pop up if you have a syntax error of some sort (didn''t found out what kind of [something todo with variables - i think]). Check your syntax. (Rebooting and other crazy stuff wont help)
As this program is short ... start to remove instructions until error is gone (hard way - but it works)
As this program is short ... start to remove instructions until error is gone (hard way - but it works)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement