八度:如何将变量放入fopen的文件名中
我有一个变量,它是我的文本文件名称的一部分:
Test123_Variable.txt
现在我想使用函数 fopen 打开文本文件,但由于我的文件名取决于变量的名称,我不知道如何制作正确的语法:
这显然不起作用: filename = ("Test123_Variable.txt");
如何解决此问题?
I have a Variable which is part of the Name of my Textfile:
Test123_Variable.txt
Now I want to use the Function fopen to open the textfile, but since my Filename is dependent on the name of my variable I don't know how to make the right syntax:
This is obviously not working:filename = ("Test123_Variable.txt");
How can I fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我理解您的目标,
那应该做您期望的。例子:
If i understand right your purpose,
should do what you expect. Example: