I have the next code:
char shapetype;
std::cout << "which shape would you like to work with?" << std::endl;
std::cin >> shapetype;
switch (shapetype) {
case 'c':
std::cout << "enter color, name, rad for circle" << std::endl;
std::cin >> col >> nam >> rad;
If I writing for exemple 'cemfkem' in line 2, in shapetype I have c and the other part of the string is staying in the buffer so when i getting in the col, nam and rad the buffer get inside the col the other part of the string. how can I clean the buffer?