Record Detail

Compile Error

prepare (1/3): 
finished

make (2/3): 
g++ -g -Wall -O2 -o main.o -c main.cpp 
main.cpp: In function 'int main(int, char**)':
main.cpp:47:8: error: 'strcmp' was not declared in this scope
    if(!strcmp(optarg, "BINARY"))
        ^~~~~~
main.cpp:47:8: note: suggested alternative: 'strtoq'
    if(!strcmp(optarg, "BINARY"))
        ^~~~~~
        strtoq
main.cpp:49:8: error: 'strcmp' was not declared in this scope
    if(!strcmp(optarg, "UNSORTED"))
        ^~~~~~
main.cpp:49:8: note: suggested alternative: 'strtoq'
    if(!strcmp(optarg, "UNSORTED"))
        ^~~~~~
        strtoq
In file included from main.cpp:5:0:
binary_heap.h: In instantiation of 'void binary_heap<TYPE, COMP>::percolateDown(int) [with TYPE = grid*; COMP = compare_t]':
binary_heap.h:72:15:   required from 'TYPE binary_heap<TYPE, COMP>::dequeue_min() [with TYPE = grid*; COMP = compare_t]'
main.cpp:138:1:   required from here
binary_heap.h:103:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int j = 2*id; j <= data.size(); j = 2*id){
binary_heap.h:104:8: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if(j < data.size() && !compare(data[j-1], data[j]))
Makefile:13: recipe for target 'main.o' failed
make: *** [main.o] Error 1

build failed

Information

Submit By
Type
Submission
Homework
Lab05-PriorityQueues
Language
GNU Make
Submit At
2019-11-10 23:53:30
Judged At
2019-11-10 23:53:30
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes