I have a problem with this code snippet and i can't realise what i did wrong.
The error output is like this:
/storage/emulated/0/Documents/feladat.cpp:18:7: warning: expression result unused [-Wunused-value]
                                b[i, j] = b[a[i + 1], a[i]];
                                  ^
/storage/emulated/0/Documents/feladat.cpp:19:9: error: invalid operands to binary expression ('std::__ndk1::ostream' (aka 'basic_ostream<char>') and 'vector<vector<int> >')
                                cout<<b;
                                ~~~~^ ~
/data/data/ru.iiec.cxxdroid/files/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../include/c++/4.9.x/ostream:218:20: note: candidate function not viable: no known conversion from 'vector<vector<int> >' to 'const void *' for 1st argument; take the address of the argument with &
    basic_ostream& operator<<(const void* __p);
And it goes on with different types in the ()s
It would be a program which makes pairs into the b vector, if two number's difference is 1.
Here is my code:
#include <iostream>
#include <vector>
using namespace std;
int main()
{
    vector<int> a = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
    vector<vector<int>> b;
    b.reserve(10);
    int i = 0;
    int j = 1;
    for (i < a.size(); i++;)
    {
        for (j <= a.size(); j++;)
        {
            if (a[i + 1] - a[i] == 1)
            {
                b[i, j] = b[a[i + 1], a[i]];
                cout << b;
            }
        }
    }
    return 0;
}
 
     
    