I have a simple application in qt and I'm trying to link some code that I have to it. However, when I'm merging the files in the project, it compiles, but I get an error at startup. When I try to debug it, I get a pop up message telling me Executable error : During startup program exited with code 0xc0000139.
I searched in google and I found that it's probably a dll error. I've got to admit, I don't really know how libraries work so I'm a bit confused.
I trying to import the code functions by functions to see what's working and what is producing the error. A simple function like this :
void descendanceOf(std::vector< std::list<int> >& tree, int node){
std::list<int> descendance;
descendance.push_back(4);
}
produces an error, but I function like this :
bool isFatherOf(const std::vector < std::list < int > >& tree, int node1, int node2){
for(std::list<int>::const_iterator it = tree[node1].begin();
it != tree[node1].end(); it++){
if((*it) == node2){
return true;
}
}
return false;
}
works perfectly fine. I'm confused. At first I though it has something to do with the std library, but both functions use it.