how can I save struct in file … C lang

前端 未结 6 835
悲&欢浪女
悲&欢浪女 2021-01-02 18:23

I\'d like to save a struct in a file. I\'d like to realize a function which makes this work. I tried this code but it didn\'t work.

struct utilisateur   //         


        
6条回答
  •  既然无缘
    2021-01-02 19:00

    I'd look over the symbol names first, like NULL and fprint, not to mention that weird \0. As an additional thought, you should close the file after writing to make sure it gets flushed to disk, and double check that futilis variable is a char* that contains a valid, writeable path.

提交回复
热议问题