Hello, I need help with the coding on line 13

Hello, I keep getting this error with my cin.ignore.
Here is my program. Could you please tell me how to fix my
cin.ignore(number-of_romans<streamsize> ::max(), '\n');.
Thanks

[#include <iostream>

using namespace std;

int main()
{
char yes_no;
short number_of_romans, I, X, C, M;
string roman_form;
cout <<"Welcome to roman numeral program!!!\n";
cout <<"Would you like to convert your numbers to roman numerals?\n";
cin >> yes_no;
**cin.ignore(number_of_romans<streamsize> ::max(),'\n');**
while (toupper (yes_no)=='Y')
{
cout << "Wonderful!";
cout << "Enter your number:\n";
cin >> number_of_romans;
if (number_of_romans >= 4000)
{
cout <<"Sorry, the value is too large to convert to roman civilization";
cout <<"Please try a different number [strictly] less than number_of_romans, thank you";
}
else if (number_of_romans <= 0)
{
cout <<"Sorry, the value is too small to convert to roman civilization";
cout <<"Please try a different number [strictly] greater than number_of_romans, thank you";
}
else
{
M = number_of_romans / 1000;
C = number_of_romans / 100 % 10;
X = number_of_romans / 10 % 10;
I = number_of_romans % 10;

roman_form.clear();
if (I == 4)
{
roman_form += "IV";
}
else if (I == 9)
{
roman_form += "IX";
}
else
{
if (I >= 5)
{
roman_form += "V";
I = 5;
}
for (short digit = I; digit > 0; --digit)
{
roman_form += "I";
}
}
if (X==4)
{
roman_form +="XL";
}
else if (X==9)
{
roman_form +="XC";
}
else
{
if (X >=5)
{
roman_form += "L";
X = 5;
}
for (short digit = X; digit >0; --digit)
{
roman_form +="X";
}
}
if (C==4)
{
roman_form += "CD";
}
else if (C==9)
{
roman_form += "CM";
}
else
{
if (C>=5)
{
roman_form += "C";
}
}
for (short digit =M; digit >0; --digit)
{
roman_form += "M";
}
cout << roman_form <<" here is the answer\n";
}
cout << "do you want to convert any more numbers to roman?\n";
cin >> yes_no;
cin.ignore(
number_of_romans<streamsize>::max(),'\n');
}
cout << "Thank you for using our roman numeral conversion";
cout << "Have a great day, take care!";
return 0;
}]
Put the code you need help with here.
[/cin.ignore(number_of_romans<streamsize> ::max(),'\n');]

in terminal I get this error
roman.cpp: In function ‘int main()’:
roman.cpp:13:43: error: expected
primary-expression before ‘>’ token
cin.ignore(number_of_romans<streamsize>
::max(),'\n');
^
roman.cpp:13:51: error: no matching
function for call to ‘max()’
cin.ignore(number_of_romans<streamsize>
::max(),'\n');

cin.ignore(number_of_romans<streamsize> ::max(),'\n');

This simply makes no sense at all. What are you trying to do? Are you trying to ignore everything inthe buffer as far as the first '\n' ?
cin.ignore(numeric_limits<streamsize>::max(), '\n');
Yes, I am, sorry I am only a beginner.
Topic archived. No new replies allowed.