0

Hi,

I am getting the following error when I am trying to initialize a 2 dimensional vector with 0's.

I am not to figure out the reason. Any help is appreciated.

```
std::vector<int> truth_table;
std::vector<vector<int> > truth_table_col;
double no_of_twos = 7;
double base_two = 2;
cout << "No of 2's = " << no_of_twos << "\n";
double combi = pow(base_two,no_of_twos)-1;
for(int hfh=0; hfh<=(int)combi; hfh++)
{
for(int ghg=0; ghg<=(int)no_of_twos; ghg++)
{
truth_table.push_back(0);
}
truth_table_col.push_back(truth_table);
truth_table.clear();
}
```

Program received signal SIGSEGV, Segmentation fault.

0xb7433aed in _int_malloc () from /lib/tls/libc.so.6

Thanks