I have this following code:
#include "stdafx.h"
#include<iostream>
using namespace std;
const int x = 5;
bool graf_adj[x][x] = {
0,1,1,1,0,
1,0,1,0,0,
1,1,0,1,1,
1,0,1,0,0,
0,0,1,0,0
};
struct Graf
{
bool adj[x][x];
char n;
};
int main(){
Graf graf1;
graf1.adj = graf_adj;
}
in main function when i try to assing graf_adj to graf1.adj
graf1.adj = graf_adj;
complier gives me this error:
Error Expression must be a modifiable lvalue
Can anybody give a solution to this ?
Thank you