你只需要一个C字符串传入fopen().只需声明字符串char *(我建议使用const char *)变量,设置它并传入函数.
const char *filename = "my/path/to/the/file";
FILE *file = fopen(filename, "r");
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5905 次 |
| 最近记录: |