H
Hamish
I havea program which on execution gives unpredictable behaviour (it
shouldn't). In trying to track down the problem, I'm wondering if there is a
difference between these two ways of filling a std::vector with data:
Method 1:
std::vector<int> v;
int k;
for(i=0;i<n;i++){
k = i + 3;
v.push_back(k);
}
Method 2:
std::vector<int> v;
for(i=0;i<n;i++){
int k = i + 3;
v.push_back(k);
}
shouldn't). In trying to track down the problem, I'm wondering if there is a
difference between these two ways of filling a std::vector with data:
Method 1:
std::vector<int> v;
int k;
for(i=0;i<n;i++){
k = i + 3;
v.push_back(k);
}
Method 2:
std::vector<int> v;
for(i=0;i<n;i++){
int k = i + 3;
v.push_back(k);
}