4 messages in com.mysql.lists.plusplusConvert iterator object to a int
FromSent OnAttachments
Torbjörn Håkansson16 Nov 2001 00:50 
Lorenzo16 Nov 2001 01:24 
Jonathan Ludwig16 Nov 2001 08:59 
Andrew Parker16 Nov 2001 10:27 
Subject:Convert iterator object to a int
From:Torbjörn Håkansson (torb@telia.com)
Date:11/16/2001 12:50:32 AM
List:com.mysql.lists.plusplus

Hi all

I wonder if someone can explain how I can convert a object of iterator to a int.

The code snippet:

int myTestArray[5];

Result::iterator i; // The Result class has a read-only Random Access Iterator for (i = res.begin(); i != res.end(); i++) { row = *i;

myTestArray[i] = 0; // 0 or somthing else - the i is the important!!

/* more code

error C2677: binary '[' : no global operator defined which takes type 'class subscript_iterator<class const_subscript_container<class MysqlRes,class MysqlRow, class MysqlRow const ,unsigned int,int> const ,class MysqlRow const ,unsigned int,int>' (or there is no acceptable conversion)

Regards