При выводе строки на начале выводит \320 или \321

#include <iostream>
#include <string>
#include <curses.h>
using namespace std;

int numberOfElements;

struct chemistry {
    string name;
    string group;
    string charge;
    float mass;
    void elmOut() {
        cout << "|" << "\t" << name << "\t" << "|" << "\t" << group <<  "\t" << "|" << "\t" << charge << "\t" << "|" << "\t" << mass << "\t" << "|" << endl;
    }
};

void info();
void addArray(int n);
void tableBegin();

int main(int argc, const char * argv[]) {
    info();
    chemistry *arr = new chemistry [numberOfElements];
    
    for (int i = 0; i < numberOfElements; i++) {
        cin.ignore();
        
        cout << "Назва: " << endl;
        getline(cin, arr[i].name);
        
        cout << "Група: " << endl;
        getline(cin, arr[i].group);
        
        cout << "Заряд: " << endl;
        getline(cin, arr[i].charge);
        
        cout << "Маса: " << endl;
        cin >> arr[i].mass;
        cout << "==================================================" << endl;
    }
    
    tableBegin();
    
    for (int i = 0; i < numberOfElements; i++) {
        arr[i].elmOut();
    }
    
    delete [] arr;
    return 0;
}


void info() {
    cout << "Введіть кількість частинок, будь ласка: " << endl;
    cin >> numberOfElements;
    cout << "Заповніть таблицю таким чином: " << endl;
    cout << "Назва частинки, група, заряд, маса" << endl;
    cout << "(Групи частинкки: Г - гіперон, Н - нуклон, М - мезон, Л - лептон)" << endl;
    cout << endl;
}
void tableBegin() {
    cout << "Елементарні частинки" << endl;
    cout << "--------------------------------------------------" << endl;
    cout << "|" << "\t" << "Назва" << "\t" << "|" << "\t" << "Група" <<  "\t" << "|" << "\t" << "Заряд" << "\t" << "|" << "\t" << "Маса" << "\t" << "|" << endl;
    cout << "--------------------------------------------------" << endl;
}

При выводе строк перед ними выводит какие-то цыфры \320 \321 и тд И прикол в том, что иногда эти цифры не выводит, а иногда выводит. Рандом какой-то Вот так https://ibb.co/55yr2Jh


Ответы (0 шт):