Загрузка...

Ошибка с индификатором

Тема в разделе C/C++ создана пользователем Catx_inactive2317854 1 янв 2020. (поднята 1 янв 2020) 111 просмотров

Загрузка...
  1. Catx_inactive2317854
    Catx_inactive2317854 Автор темы 1 янв 2020 108 5 июн 2019
    Код
    #include <iostream>

    using namespace std;

    bool GameOver;

    const int width = 20; // Не забыть разобраться с этим
    const int heidht = 20; // Не забыть разобраться с этим
    int x, y, fruitx, fruity, score;
    enum eDirection {
    STOP = 0, LEFT, RIGHT, Up, DOWN

    }; // Не забыть разобраться с этим
    eDirection dir; // Не забыть разобраться с этим

    void Setup() {
    GameOver = false;
    dir = STOP;
    x = width / 2;
    y = heidht / 2;
    fruitx = rand() % width;
    fruitx = rand() % heidht;


    }

    void Draw() {
    system("cls"); // Не забыть разобраться с этим
    for (int i = 0; i < width; i++) {

    cout << "#"; // попробовать endl;
    cout << endl;
    }

    for (int i = 0; 9 < heidht; i++) {
    for (int j = 0; j < width; j++) {
    if (j == 0 || j == width - 1 )
    cout << "#";
    cout << "";
    }
    cout << endl;

    }


    for (int i = 0; i < width; i++) {

    cout << "#"; // попробовать endl;
    cout << endl;
    }


    }


    void Input() {



    }


    void Logik() {



    }



    int main()
    {
    Setup();

    while (!GameOver) // Не забыть разобраться с этим
    {

    Draw();
    Input();
    Logik();
    }


    return 0;
    }
    Ошибка cout необявленный индификатор
     
Top