c++报错array must be initialized with a brace-enclosed initializer

#include
using namespace std;
int main(){
    struct st{
        int type; //目录为1,文件为2
        char fn[20];
        struct st *child[20];
        int chpos;
        struct st *parent;
    };
    st *p;
    struct st files[1024];
    st gen = {1,"c:",NULL,0,NULL};
    p = &gen;
    int pos = 0;
    files[pos] = gen;pos++;
    cout << "请选择 1.创建 2.删除 3.进入 4.回到根目录" <int ch;
    cin >> ch;
    switch(ch){
        case 1:
            cout << "请输入文件名" << endl;
            char fn1[20];
            cin >> fn1;
            cout << "请输入文件类型" << endl;
            int t;
            cin >> t;
            st newf = {t,fn1,NULL,0,NULL}; 这行报错
            files[pos] = newf;
            pos++;
    }
}

把fn1和fn的类型改为string就不报错了,不知道为什么

“变量赋值”和“变量初始化”不是一回事!
“变量赋值”发生在运行期,其写法遵循赋值语法规定。
“变量初始化”发生在编译期或运行期,其写法遵循初始化列表语法规定。