打开文件fopen()并打印值 [英] Open file fopen() and print values

查看:664
本文介绍了打开文件fopen()并打印值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用fopen打开文件并打印值?

How can i open a file with fopen and print the values?

推荐答案

您应该使用fopen打开文件。它将返回一个文件指针,您可以使用该指针读取值(使用fread)到您的变量,然后您可以打印这些变量的值,伙计。


ps。:use如果它是一个二进制文件就吓到...如果你要阅读的文件是文本你可以使用fscanf,好吗?


祝你好运

TNGA
You should use fopen to open the file. It will return a file pointer that you may use to read the values (using fread) to your variables and then you may print the value of these variables, dude.

ps.: use fread if it''s a binary file... if the file you want to read is text you may use fscanf, ok?

Best regards
TNGA


什么指针?你可以发贴代码吗?
what pointer? And can you please post the code?



什么指针?你可以发贴代码吗?
what pointer? And can you please post the code?



如何在 c ++ / c


我们不能只是给你代码。你应该如何自己学习?

Heres how to do it in c++/c

We can''t just give you the code though. How are you supposed to learn on your own?


这篇关于打开文件fopen()并打印值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆