My code won't compile
Posted: Wed Feb 18, 2015 11:56 pm
Hi, im new to CodeLite and to C++, trying to learn on my own from a hands-on approach. Anyway i have this code that i got from a book im reading (it's supposed to be a converter from Celsius to Fahrenheit):
when i try to compile and run, i get this error message:
C:\Windows\system32\cmd.exe /C " -j 2 -e -f Makefile"
'-j' is not recognized as an internal or external command,
operable program or batch file.
0 errors, 0 warnings
Please help me around this?
Code: Select all
//
// Program to convert temperature from Celsius degree
// units into Fahrenheit degree units:
// Fahrenheit = Celsius * (212 - 32)/100 + 32
//
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{
// enter the temperature in Celsius
int celsius;
cout << “Enter the temperature in Celsius:”;
cin >> celsius;
// calculate conversion factor for Celsius
// to Fahrenheit
int factor;
factor = 212 - 32;
// use conversion factor to convert Celsius
// into Fahrenheit values
int fahrenheit;
fahrenheit = factor * celsius/100 + 32;
// output the results (followed by a NewLine)
cout << “Fahrenheit value is:”;
cout << fahrenheit << endl;
// wait until user is ready before terminating program
// to allow the user to see the program results
system(“PAUSE”);
return 0;
}
C:\Windows\system32\cmd.exe /C " -j 2 -e -f Makefile"
'-j' is not recognized as an internal or external command,
operable program or batch file.
0 errors, 0 warnings
Please help me around this?