C++ class expression must be a modifiable lvalue

Viewed 1653

I have following code

#include<iostream>
#include<fstream>
using  namespace std;
const int MAX_ARRAY = 26;
class canvas{
private:
    char painting[MAX_ARRAY][MAX_ARRAY];
    char fileName[10];
public:
    canvas(){
        fileName = "zzz.txt";
    }

};

But the fileName = "zzz.txt" is giving syntax error that is

Expression must be a modifiable lvalue
1 Answers
Related