vendredi 24 mars 2017

condition variables c++ windows

I am trying to run some code copied from Windows Dev Center, but keep encountering an error over some unresolved identifiers. This maybe sound silly, but why would these lines cause this error:

CONDITION_VARIABLE BufferNotEmpty;
CONDITION_VARIABLE BufferNotFull;

And "not declared in this scope" on other lines similar to this:

SleepConditionVariableCS (&BufferNotFull, &BufferLock, INFINITE);

When I've included all the headers (or at least i think) necessary?

#include <mutex>
#include <condition_variable>
#include <cstdint>
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>

Running NetBeans with project configured to C++11 in case that changes anything. Thanks in advance if anyone has any suggestions!

Aucun commentaire:

Enregistrer un commentaire