Dining Philosopher correctness How should I improve my solution for Dining Philosopher's problem?

#include "stdafx.h"
#include "iostream"
#include "vector"
#include "algorithm"
#include "mutex"
#include "chrono"
using namespace std;

class Dining {
public:
    static int starved_threads;
private:    
    std::recursive_mutex arbit;
    std::vector&lt;int&gt; chopsticks;
    int count;
public:
    Dining()
    {
        vector&lt;int&gt; v = { 1,2,3,4,5 };
        chopsticks = v;
        count = 0;
    }
private:
    int acquire()
    {
        arbit.lock();
        int x = chopsticks[count%chopsticks.size()];
        chopsticks[count%chopsticks.size()] = 0;
        count++;
        arbit.unlock();
        return x;

    }
    void release(int i)
    {
        arbit.lock();
        chopsticks[i - 1] = i;
        arbit.unlock();
    }

public:
    void eatThink() {
        while (true) {
            int left = 0, right = 0;
            left = acquire();
            if (left != 0)
                right = acquire();
            else {
                if (left != 0)
                    release(left);
            }
            arbit.lock();
            if (left &amp;&amp; right)
            {
                cout &lt;&lt; "Thread " &lt;&lt; std::this_thread::get_id() &lt;&lt; "Eating" &lt;&lt; endl;
                std::this_thread::sleep_for(std::chrono::milliseconds(10));
                cout &lt;&lt; "Thread " &lt;&lt; std::this_thread::get_id() &lt;&lt; "Releasing" &lt;&lt; endl;
            }
            arbit.unlock();

            if (left &gt; 0)
            {
                release(left);
            }

            if (right &gt; 0)
            {
                release(right);
                arbit.lock();
                starved_threads++;
                cout &lt;&lt; starved_threads;
                arbit.unlock();
                return;
            }
        }
    }
};

int Dining::starved_threads = 0;

int main()
{

    Dining* philosophers = new Dining();
    int size = 20;
    std::vector&lt;std::thread&gt; threads(size);
    for (int i = 0; i &lt; 5; i++) {
        for (int i = 0; i &lt; size; i++) {
            threads[i] = std::thread(&amp;Dining::eatThink, philosophers);
        }
        for (int i = 0; i &lt; threads.size(); i++) {
            threads[i].join();
        }
    }
    return 0;
}
Dinning Philosophers

How should I improve my solution for Dining Philosopher's problem?

Well first implementing the Dining Philosophers problem would be good. This is an interesting problem you implemented but its not the classic Dinning Philosophers
The issue here is that in your implementation each philosopher tries to grab any two forks. In the classic implementation each philosopher is assigned two specific forks (though each is shared with another philosopher).
The other issue is that you have a single lock for the whole table. In reality you should have a lock on each fork. Just because philosopher one is grabbing fork one does not stop philosopher three grabbing fork three.
Also if a philosopher fails to get either fork, then it must give up all forks and think for a random period.
Code Review
Prefer initializer list. Also you don't need a temporary v in the constructor.
Dining()
{
    vector&lt;int&gt; v = { 1,2,3,4,5 };
    chopsticks = v;
    count = 0;
}

Dining()
    : chopsticks{ 1, 2, 3, 4, 5}
    , count(0)
{}

Use RIAA.
If you have code that looks like
InitSomething

// Stuff

UnitSomething

Then you should have an object that handles the InitSomething in the constructor and UnitSomething in the destructor.
In this:
    arbit.lock();

    // STUFF

    arbit.unlock();

Should look like this:
    std::lock_guard&lt;std::recursive_mutex&gt;   lock(arbit);
    // STUFF

Don't use dynamic allocation when automatic variables will work
Dining* philosophers = new Dining();

This should be:
Dining   philosophers;