Hello,
in my program I use vectors, and I get a segfault. I use gcc on windows 10 x64. I could reproduce it with a test file:
Does somebody know why I get a sagfault? Did I miss something in vectors behaviour?
in my program I use vectors, and I get a segfault. I use gcc on windows 10 x64. I could reproduce it with a test file:
Code:
#include <iostream>
#include <vector>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
std::vector<int> tvec = vector<int>();
tvec.reserve(256);
for(int counter = 0; counter < 256; counter++){
tvec->at(counter) = 0;
}
return 0;
}
Comment