S
Serengeti
hello,
I've had some hard time trying to understand why does this code
compile:
http://cpp.sourceforge.net/?show=10151 (*)
while this doesn't:
http://cpp.sourceforge.net/?show=10150 (**)
Any insights would be greatly appreciated.
tia,
Slawek
(*)
#include <vector>
using std::vector;
int main()
{
vector<double> vect;
for(vector<double>::const_iterator v = vect.begin(); v !=
vect.end(); v++);
}
(**)
#include <vector>
using std::vector;
int main()
{
vector<double> vect;
for(vector<double>::const_reverse_iterator v = vect.rbegin(); v !=
vect.rend(); v++);
}
I've had some hard time trying to understand why does this code
compile:
http://cpp.sourceforge.net/?show=10151 (*)
while this doesn't:
http://cpp.sourceforge.net/?show=10150 (**)
Any insights would be greatly appreciated.
tia,
Slawek
(*)
#include <vector>
using std::vector;
int main()
{
vector<double> vect;
for(vector<double>::const_iterator v = vect.begin(); v !=
vect.end(); v++);
}
(**)
#include <vector>
using std::vector;
int main()
{
vector<double> vect;
for(vector<double>::const_reverse_iterator v = vect.rbegin(); v !=
vect.rend(); v++);
}