I am using an iterator in a C++ code to retrieve records read using sqlite3 statements. I am able to display the contents pointed to by the iterator to screen using cout
. How would i assign the value to a simple float
or array variable.
typedef vector<vector<string> > Records;
vector< vector<string> >::iterator iter_ii;
vector<string>::iterator iter_jj;
Records records = select_stmt("SELECT density FROM Ftable where PROG=2.0");
for(iter_ii=records.begin(); iter_ii!=records.end(); iter_ii++)
{
for(iter_jj=(*iter_ii).begin(); iter_jj!=(*iter_ii).end(); iter_jj++)
{
cout << *iter_jj << endl; //This works fine and data gets displayed!
//How do i store the data pointed to by *iter_jj in a simple float variable or array?
}
}