title: C++/cli error C4368: cannot define 'list' as a member of managed 'queue': mixed types are not supported
body: <p>I'm totally new to c++ Gui..
  i'm trying to make a simple windows form to draw on my dining philosophers semaphore solution </p>
  
  <p>my semaphore header file </p>
  
  <pre><code>ref class sema4
  {
   private:
    int sem_value;
    queue Waiting_List;
   public:
    sema4();
    void wait(HANDLE h);
    void signal();
  };
  </code></pre>
  
  <p>My semaphore cpp</p>
  
  <pre><code>sema4::sema4()
  {
   sem_value=1;
  }
  
  //suspend the thread 
  void sema4::wait(HANDLE h)
  {
   sem_value = sem_value - 1;
   if (sem_value &lt; 0)
    {
      Waiting_List.enqueue(h);
      SuspendThread(h);
    }
  }
  
  //Resume the thread
  void sema4::signal()
  {
    sem_value = sem_value + 1;
    if (sem_value &lt;= 0)
     {
      ResumeThread(Waiting_List.dequeue());
     }
  }
  </code></pre>
  
  <p>My queue header file</p>
  
  <pre><code>ref class queue
  {
   private:
    HANDLE list[20];
    int front;
    int rear;
  
   public:
    queue();
    void enqueue(HANDLE x);
    HANDLE dequeue();
    bool isempty();
    bool isfull();
   };
  </code></pre>
  
  <p>the queue CPP </p>
  
  <pre><code>queue::queue()
  {
    front=-1;
    rear=-1;
  }
  
  
  void queue::enqueue(HANDLE x)
  {
    if(isfull())
     {
       cout&lt;&lt;"queue is full";
     }
   else
    {
      if(front==-1)
              front=0;
  
      rear=(rear+1)%20;
      list[rear]=x;
    }
  } 
  
  
  bool queue::isfull(){
    if (front==(rear+1)%20)
          return true;
    return false;
  }
  
  
  HANDLE queue::dequeue(){
    if(isempty())
     {
        cout&lt;&lt;"queue is empty";
        return NULL;
     }
    else
     {
      HANDLE x =alist[front];
      if (front==rear)
          front=rear=-1;
      else front = (front + 1) % 20;
     }
   }
  
  bool queue::isempty()
  {
    if((front == rear) &amp;&amp; (rear == -1))
    {
      return true;
    }
  return false;
  }
  </code></pre>
  
  <p>i keep getting the error C4368: cannot define 'list' as a member of managed 'queue': mixed types are not supported
  and i have no real experience using c++ windows forms </p>