>> nope, it didint worked.
Post the entire code from the function when you tried her code. Tell us why you think it didn't work.

Your attempt is not really close. The size and length functions don't take arguments, so passing 4 makes no sense. If you wanted to check the size of a string to see if it is 4 you would use itemStockNumber.size() == 4 or itemStockNumber.size() != 4. Even if it compiled, you have a loop but the code to read in the value is outside the loop so the user can only try once.

Please enter the item's stock number.
The item's stock number must be a four digit number: 78
The item's stock number must be a four digit number: 1
The item's stock number must be a four digit number: 222
The item's stock number must be a four digit number: 5812
Please enter the price of item # : 45.85
Please enter the quantity of item #: 15
Item #5812's price is $45.85 and has 15 items in stock.
The total value of the items is $-1.07374e+008
Press any key to continue . . .

The problem is that it doesn't want to display the result of 45.85 * 15

Please enter the item's stock number.
The item's stock number must be a four digit number: 7
The item's stock number must be a four digit number: 7
The item's stock number must be a four digit number: 545
The item's stock number must be a four digit number: 22
The item's stock number must be a four digit number: 7896
Please enter the price of item # 7896: 15.50
Please enter the quantity of item #7896: 65
Item #7896's price is $15.5 and has 65 items in stock.
The total value of the items is $1007.5
Press any key to continue . . .

>> No, that part is fine
The code I posted doesn't give a warning, I'm just giving you a suggestion about how to write better code if you're interested in doing more than getting things to work for the moment.