loop will not break

Why wont the break statement exit my code the values themselves don't matter but when roomType = 0. I know they are equal i displayed it. The loop won't break. I get all my values through fstream

[code]
while (!ins.eof())
{
ins >> kTax >> livingTax >> bTax >> bedroomTax >> denTax >> diningTax;
ins >> minTax >> maxTax >> luxFootage >> luxTax;
ins.ignore(10, '\n');
getline(ins, address);

do
{
ins >> roomType;
if (roomType == 0)
{
break;
}


ins >> length >> width;
cout << roomType;
[\code]
Last edited on
What you have shown us here won't compile. What loop are you expecting to be broken out from? I see a while loop, and inside it half of a do-while loop, except it's missing the while.
Topic archived. No new replies allowed.