Hello, I am having trouble with a program that is supposed to determine Whether the user entered an item number in the required format: three digits, a hyphen, and two digits. Use a sentinel value to end the program. I tried incorporating similar code from earlier in the chapter, but I’m unsure why my program isn’t working. It runs but doesn’t have output. Any help would be much appreciated.
/* Joe McMahon C++ 4
*/
#include <iostream>
#include <string>
#include <iomanip>
#include <cstdlib>
using namespace std;
int main()
{
string item = "";
while (item != "-1")
{
cout << "Item number (-1 to stop)(XXX-XX): " << endl;
getline(cin, item);