what is the reason for fopen's failure to open a file

前端 未结 4 1853
醉梦人生
醉梦人生 2020-12-31 17:04

I have the following code where I am trying to open a text file.

char frd[32]=\"word-list.txt\";
   FILE *rd=fopen(frd,\"rb\");
   if(!rd)
       std::cout&         


        
4条回答
  •  隐瞒了意图╮
    2020-12-31 17:20

    r Open for reading (existing file only) and rb Open for reading (existing file only) in binary mode. Make sure you have the file in your working directory.

提交回复
热议问题