Don't use %zu as a formatting specifier

%zu is C99 and therefore not supported by msvc
Check if the queue is empty before accessing front()

Accessing front() when a container is empty is undefined behavior according to the C++ standard
On Windows, it causes a CrtException, on Linux it apparently returns NULL....