|
instantiating std::vector<int> with a initialization list caused the program to crash
|
02/08/2018 10:45 AM
post118527
|
instantiating std::vector<int> with a initialization list caused the program to crash
QNX software Development Platform 6.6
#include <cstdlib>
#include <iostream>
#include <vector>
#include <string>
int main(int argc, char *argv[]) {
std::vector<int> test0{1, 2, 3, 4};
std::vector<std::string> test{"a", "b", "c"};
std::cout << test[0];
return 0;
}
this program crashes (SignalKill) at the first line of the main function
|
|
|