Hi
Im working with dev c++ and until now Ive been writing programs in C, and compiling them without any problems in DevCPP
the problem is that when i write code in C++ , Dev C++ wont compile it.
I copy pasted a code from some C++ book and tried to compile it ,
heres the code and the the errors given by cpp:
code:
Code:#include <cstdio> #include <cstdlib> #include <iostream> using namespace std; int main(int nNumberofArgs, char* pszArgs[]) { int celsius; cout <<“Enter the temperature in Celsius:”; cin >> celsius; int factor; factor = 212 - 32; int fahrenheit; fahrenheit = factor * celsius/100 + 32; cout << “Fahrenheit value is:”; cout << fahrenheit << endl; system(“PAUSE”); return 0; }
errors:
whats wrong ??Code:C:\Documents and Settings\Owner\שולחן העבודה\5.cpp: In function `int main(int, char**)': C:\Documents and Settings\Owner\שולחן העבודה\5.cpp:14: error: stray '\147' in program C:\Documents and Settings\Owner\שולחן העבודה\5.cpp:14: error: `Enter' undeclared (first use this function) C:\Documents and Settings\Owner\שולחן העבודה\5.cpp:14: error: (Each undeclared identifier is reported only once for each function it appears in.) C:\Documents and Settings\Owner\שולחן העבודה\5.cpp:14: error: expected `;' before "the" C:\Documents and Settings\Owner\שולחן העבודה\5.cpp:14: error: stray '\148' in program C:\Documents and Settings\Owner\שולחן העבודה\5.cpp:25: error: stray '\147' in program C:\Documents and Settings\Owner\שולחן העבודה\5.cpp:25: error: `Fahrenheit' undeclared (first use this function) C:\Documents and Settings\Owner\שולחן העבודה\5.cpp:25: error: expected `;' before "value" C:\Documents and Settings\Owner\שולחן העבודה\5.cpp:25: error: stray '\148' in program C:\Documents and Settings\Owner\שולחן העבודה\5.cpp:29: error: stray '\147' in program C:\Documents and Settings\Owner\שולחן העבודה\5.cpp:29: error: stray '\148' in program C:\Documents and Settings\Owner\שולחן העבודה\5.cpp:29: error: `PAUSE' undeclared (first use this function) Execution terminated
is there some configuration i have to do before coding in c++??



LinkBack URL
About LinkBacks



