In code below I can't push the initial table in the deque and I can't assign the front of the deque in a value x.
Can someone tell me how to fix this?
What should I use instead of a char array in order to make this program work?
#include <iostream>
#include <deque>
using namespace std;
char x[4][4];
deque<char [4][4]> myStack;
char func(char initial[4][4])
{
myStack.push_front(initial[4][4]); // ERROR1
x[4][4]=myStack.front(); // ERROR2
}
Attempting to compile the above produces the errors:
ERROR1: no instance of overloaded function "
std::deque<_Ty, _Ax>::push_front [with _Ty=char [4][4], _Ax=std::allocator<char [4][4]>]
" matches the argument listERROR2: a value of type "
char (*)[4]
" cannot be assigned to an entity of type "char
"