Inputting file for first time for dynamic array

I am trying to read in my file for the first time so I can set my dynamic array of a class. The code I have compiles but it hangs up when I try to run it.

int counter = 0;
int hsn, bth, bed, sf, prc;
string str;

do
{
cin >> hsn >> str >> bth >> bed
>> sf >> prc;

if(input.good())
{
counter++;
}
}while(input.good());

I don't know why this doesn't work. Any suggestions?
It hangs, like an infinite loop, not hangs up
Why are you getting your data from cin, but using input to control the loop?
Because I make stupid mistakes like that. It works now, thanks!
Topic archived. No new replies allowed.