非常自我解释.这是导致'new vector'行上的SIGABRT的方法:
vector<string> * Task::arguments() {
vector<string> *args = new vector<string>(); // CAUSES SIGABRT
int count = sizeof(_arguments);
for (int x = 0; x < count; x++) {
string argument(_arguments[x]);
args->push_back(argument);
}
return args;
}
Run Code Online (Sandbox Code Playgroud)
请注意,在其他地方我称之为确切的行没有任何问题.以下是Task类中包含的列表:
#include <vector>
#include <unistd.h>
#include <string>
using namespace std;
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
Run Code Online (Sandbox Code Playgroud)
有什么想法吗?