Dev-C++ debugger stops at this section o' code.. I am wondering if my attempt at using the istringstream object is anywhere close to correct.. and maybe a few pointers on how to use it correctly:
Code:
int tempint = 0,
qnty = 0;
for(int i=0, end=lotarray.size(); i<end; i++)
{
istringstream myStream(lotarray[i].numbers); //lotarray[i].numbers is a string that would look like this: "9,13,4,11,45,27"
for(int j=0; j<5; j++)
{
myStream >> tempint;
game_nos.push_back(tempint);
}
myStream >> tempint;
pballs.push_back(tempint);
}
the game object:
Code:
struct game
{
string date;
string numbers;
friend istream& operator>> (istream& ins, game& target);
friend ostream& operator<< (ostream& outs, game& target);
};
the lotarray object:
Code:
vector<game> lotarray;
complete code is available upon request.. my program compiles, so I don't have any compiler errors.. just seems to stop working when it reaches the above code.