T
trxrse
Hello,
I've got the following piece of code:
#include <string>
#include <fstream>
#include <cstdlib>
#include <vector>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <cmath>
vector <vector <double> > data;
for (long i=0;i<Count_Grid_Easting-1;i++){
data.push_back(vector <double>());
for (long j=0;j<Count_Grid_Northing-1;j++){
data[j]=0;
}
}
vector <vector <double> > data_occupied;
for (long i=0;i<Count_Grid_Easting-1;i++){
data_occupied.push_back(vector <double>());
for (long j=0;j<Count_Grid_Northing-1;j++){
data_occupied[j]=0;
}
}
Every time I run it I get "Segmentation Fault". What am I doing
wrong, here, people???
Thanks
trxrse
I've got the following piece of code:
#include <string>
#include <fstream>
#include <cstdlib>
#include <vector>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <cmath>
vector <vector <double> > data;
for (long i=0;i<Count_Grid_Easting-1;i++){
data.push_back(vector <double>());
for (long j=0;j<Count_Grid_Northing-1;j++){
data[j]=0;
}
}
vector <vector <double> > data_occupied;
for (long i=0;i<Count_Grid_Easting-1;i++){
data_occupied.push_back(vector <double>());
for (long j=0;j<Count_Grid_Northing-1;j++){
data_occupied[j]=0;
}
}
Every time I run it I get "Segmentation Fault". What am I doing
wrong, here, people???
Thanks
trxrse