Система не объявлена ​​в области действия?

Я знаю его простой код. Как исправить проблему "Система не указана в области видимости"?

#include<iostream>
using namespace std;

int main(void)
{
    system ( "TITLE Calculator" );
    system ( "COLOR 2" );
    char cChar;
    double dfirstnumber;
    double dsecondnumber;
    char cDoagain;

    do
    {
        system("CLS");
        cout << "Please enter the first number you would like to use."<< endl;
        cin >> dfirstnumber;
        cout<< "Please enter the operation you would like to perform." << " (+,-,*,or /)" << endl;
        cin >> cChar;
        cout<< "Please enter the second number you would like to use." << endl;
        cin >> dsecondnumber;

        switch (cChar)
        {
            case '+':
                cout << "The answer is: " << dfirstnumber << "+" << dsecondnumber << "=" <<
                (dfirstnumber + dsecondnumber) << endl;
                break;
            case '-':
                cout << "The answer is: " << dfirstnumber << "-" << dsecondnumber << "=" <<
                (dfirstnumber - dsecondnumber) << endl;
                break;
            case '*':
                cout << "The answer is: " << dfirstnumber << "*" << dsecondnumber << "=" <<
                (dfirstnumber * dsecondnumber) << endl;
                break;
            case 'x':
                cout << "The answer is: " << dfirstnumber << "x" << dsecondnumber << "=" <<
                (dfirstnumber * dsecondnumber) << endl;
                break;
            case 'X':
                cout << "The answer is: " << dfirstnumber << "X" << dsecondnumber << "=" <<
                (dfirstnumber * dsecondnumber) << endl;
                break;
            case '/':
                if(dsecondnumber == 0){
                cout<< "That is an invalid operation." << endl;}
                else{
                cout << "The answer is: " << dfirstnumber << "/" << dsecondnumber << "=" <<
                (dfirstnumber / dsecondnumber) << endl;

        }
                break;
                default:
                    cout << "That is an invalid operation." << endl;
                    break;
    }
                cout << "Would you like to start again? (Y/N)" << endl;
                cin >>  cDoagain;
    }while (cDoagain == 'Y' or cDoagain == 'y');
    system("PAUSE");
    return 0;
}

Вот мое окончательное сообщение:

C: \ Documents and Settings \ Nilo \ My Documents \ Work \ Testing \ main.cpp || В функция 'int main ()': | C: \ Documents and Settings \ Nilo \ My Documents \ Work \ Testing \ main.cpp | 8 | ошибка: 'система' не была объявлена ​​в эта область ||

| === Сборка завершена: 1 ошибка, 0 предупреждений === |

18
задан miller 23 February 2015 в 09:05
поделиться