#include<iostream> #include<windows.h> // для system("cls"); using namespace std; struct librariesCatalog { char author[64]; char name[64]; int date; char group[64]; }; void showData(const librariesCatalog Obj[], int amount); int main() { setlocale(LC_ALL, "rus"); const int amountOfBooks = 1; librariesCatalog Book[amountOfBooks] = {};//на эту часть реагирует С++ Builder for (int i = 0; i < amountOfBooks; i++) { cout << "Books author: "; cin.getline(Book[i].author, 32); cout << "Name: "; cin.getline(Book[i].name, 32); cout << "Year of publication: "; cin >> Book[i].date; cin.ignore(); cout << "Group: (f - Fiction, e - educational literature , r - further reading)"; cin.getline(Book[i].group, 32); cout << endl; } showData(Book, amountOfBooks); return 0; } void showData(const librariesCatalog Obj[], int amount) { system("cls"); cout << "№\t" << "Books author\t" << "Name\t" << "\tYear of publication\t" << "\tGroup\t" << endl; cout << "=============================================================================" << endl; for (int i = 0; i < amount; i++) { cout << i + 1 << '\t' << Obj[i].author << '\t'<< Obj[i].name<< '\t'<< '\t' << Obj[i].date << '\t' << '\t' <<'\t' << Obj[i].group << endl; } } Error text:
[C ++ Error] Unit1.cpp (24): E2264 Expression expected