Is it possible to initialize a C++ std::queue with a NULL value like other variables?
Like this:
HANDLE variable = NULL;
class Test
{
}
i.e.
std::queue<Test*> testQueue = NULL;
or
testQueue.empty();
or something like that?
If you write this:
std::queue<Test*> testQueue; //it is default initialized
then that is enough; no need to make it pointer and initialized it with NULL.
Also, you can do this:
if ( testQueue.empty())
{
//testQueue is empty
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With