나는 다음과 같은 예제를 사용하여 C++을 배우고 있습니다. "` 'undeclared (먼저이 함수 사용)'을 입력하십시오." 이 사이트에서 몇 가지 질문을 읽었으며 함수를 선언하지 않는 것과 관련이있는 것으로 보입니다. 그러나 나는 그것을 작동시킬 수 없다. 어떤 도움이라도 대단히 감사하겠습니다.오류 : cout C++ undeclared
//
// 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;
}
Microsoft Word에서이 질문을 입력하고 있습니까? – 0x499602D2
아니요, DEV C++ IDE에서 실제로 입력하지 않았습니다. 나는 C++에서 예제를 복사했다. Dummies For 5th edition. – sms