cout << "PODAJ NAZWĘ GRY: ";
//fflush(stdin);
//cin >> title;
getline(cin, title);
cout << "PODAJ GATUNEK GRY: ";
//fflush(stdin);
//cin >> type;
getline(cin, type);
cout << "PODAJ PRODUCENTA GRY: ";
fflush(stdin);
//cin >> producer;
getline(cin, producer);
cout << "PODAJ ROK WYDANIA GRY: ";
fflush(stdin);
cin >> date;
cout << "PODAJ DŁUGOŚĆ FABUŁY GRY: ";
fflush(stdin);
cin >> storyLenght;
cout << "PODAJ TYP ŚWIATA GRY (OTWARTY/ZAMKNIĘTY): ";
fflush(stdin);
//cin >> worldType;
getline(cin, worldType);
obiektGameShop.createSingle(title, type, producer, date, ++index,
storyLenght, worldType);
After i run a code, "NAZWA GRY" is getting skipped, cin.ignore don't work. When I use only cin, after I type some title with space bar cin get skipped (for example, when title has 2 space bar code skip 2 cin's) https://i.stack.imgur.com/mPSrk.png