#include <vector>
#include <iostream>
usingnamespace std;
class foo{
public:
vector<int> m_bar;
};
int main(){
foo a;
a.m_bar.resize(10);
//this is fine with the comma operator
for (char a = 'c', int i = 0; i < 5; i++, a++)
;
// yet this is not fine with comma operator
for (int i = 0, vector<int>::iterator iter = a.m_bar.begin();
iter != a.m_bar.end(); iter++, i++)
;
return 0;
}
#include <vector>
#include <iostream>
usingnamespace std;
class foo{
public:
vector<int> m_bar;
};
int main(){
foo a;
a.m_bar.resize(10);
//this is fine with the comma operator
for (char a = 'c', int i = 0; i < 5; i++, a++)
;
int i = 0;
for (vector<int>::iterator iter = a.m_bar.begin();
iter != a.m_bar.end(); iter++, i++)
;
return 0;
}