how to store database fields in a single vector
<p>I am fetching 6 fields from a database. Currently I am using structure. I want to store the database fields in a single vector. Is it possible through a vector of objects? If yes, how?</p>

<p>I have more than 70,000 rows in the database. I fetched it and stored inside a temp table, like this:</p>

<pre><code>// select statement to fetch from temp_table. for example select * from temp_table 

while(cursor.fetch())
{
cursor &gt;&gt; field;

cout&lt;&lt;field;
}
</code></pre>

<p>Will it be efficient to store in a structure or vector in the while loop and print it, or is the above method fine?</p>
