The problem may be the compare() function which doesn't return the result of comparison. Try:
bool compare(Node a, Node b){
return a.global < b.global;
}
In the future you may consider passing -Wall parameter to GCC (4.7.3). The compiler will warn you about such mistakes. clang (3.2) warns about them by default, VC++ (2010) reports an error.