0_0_20012358_27291.cpp:6:17: error: 'X' was not declared in this scope
priority_queue <X> q;
^
0_0_20012358_27291.cpp:6:18: error: template argument 1 is invalid
priority_queue <X> q;
^
0_0_20012358_27291.cpp:6:18: error: template argument 2 is invalid
0_0_20012358_27291.cpp:6:18: error: template argument 3 is invalid
0_0_20012358_27291.cpp:6:21: error: invalid type in declaration before ';' token
priority_queue <X> q;
^
0_0_20012358_27291.cpp: In function 'int main()':
0_0_20012358_27291.cpp:14:5: error: 'X' was not declared in this scope
X t;
^
0_0_20012358_27291.cpp:19:18: error: request for member 'empty' in 'q', which is of non-class type 'int'
while(!q.empty())
^
0_0_20012358_27291.cpp:20:6: error: request for member 'pop' in 'q', which is of non-class type 'int'
q.pop();
^
0_0_20012358_27291.cpp:26:34: error: request for member 'top' in 'q', which is of non-class type 'int'
printf("%d\n", q.top());
^
0_0_20012358_27291.cpp:31:17: error: 't' was not declared in this scope
t.y = num;
^
0_0_20012358_27291.cpp:32:19: error: request for member 'push' in 'q', which is of non-class type 'int'
q.push(t);
^
0_0_20012358_27291.cpp:33:22: error: request for member 'size' in 'q', which is of non-class type 'int'
if(q.size() > k)
^
0_0_20012358_27291.cpp:34:19: error: request for member 'pop' in 'q', which is of non-class type 'int'
q.pop();
^
|