#include <queue>
using namespace std;
namespace {
class priority_queue;
}
priority_queue pq;
How can I distinguish between the two priority_queue names? I tried ::priority_queue
to get the global one but to no avail.
#include <queue>
using namespace std;
namespace {
class priority_queue;
}
priority_queue pq;
How can I distinguish between the two priority_queue names? I tried ::priority_queue
to get the global one but to no avail.
It is simple, just change
using namespace std;
to
//using namespace std;
Now you have to type std::priority_queue
for the standard one and priority_queue
or ::priority_queue
for the custom one.