Thanks for helping me guys I been trying to do password guess matching, but Im having some issues. The problem is for example my random password generate is 1624, and then when input ask me type guess password I type 1325.
Therefore, output is: OXOX . 
O means Correct, and X means incorrect 

However, how can specify was thinking using if statments. At the moment, I store every positions from generate password, and the guess password into in array. 

This was my idea :

```
if ( x[0] == y[0] && x[1] == y[1] && x[2] == y[2] && x[3] == y[3] ){
                cout << " OOOO" << endl; 
  } 

```

**\*\*\*\*\* CORRECTION:\*\***

The problem that have if use x[i] == y[i] what if I go to i = 1? how is gonna still comparing position 0,1,2,3 ? I need to match individually every character! and right now if i =0 i would only compare 0 and the rest would be ignore it! this what i mean:

generate password: 1234

int i = 0; x = 0;
guess input: 1845
output: OXXX

int i = 1; x = 1;
guess input: 1200
output: OOXX

int i = 2; x = 2;
guess input: 0230
output X00X

This how my code looks right now

```
void randomClass () {
        std::generate_n(std::back_inserter(s), 10,
                        []() { static char c = '0'; return c++; });
        // s is now "0123456789"

        std::mt19937 g(std::random_device{}());

        // if 0 can't be the first digit
        std::uniform_int_distribution<size_t> dist(1, 9);
        std::swap(s[0], s[dist(g)]);

        // shuffle the remaining range
        std::shuffle(s.begin() + 1, s.end(), g); // non-deprecated version

        // convert only first four
        x = std::stoul(s.substr(0, 4));
        std::cout<<x << std::endl;

        //Store array
        y[0] = x/1000;
        y[1] = x/100%10;
        y[2] = x /10%10;
        y[3] =  x %10;

        }

    void guess (string b) {
        int x[4];

        for ( int i =0; i < 4; i++) {
        cout << "Make a guess:" << endl;
        getline(cin,b);
        int u = atoi(b.c_str());
        x[0] = u/1000;
        x[1] = u/100%10;
        x[2] = u /10%10;
        x[3] = u %10;

        }

    }
};

```