得到(不管)在某些地方不起作用 [英] gets(whatever) not work in some places

查看:50
本文介绍了得到(不管)在某些地方不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,我正在努力,我面临这个问题

进入第123行是不行的

注意:

项目应完全在c

i have a project that i''m working on and i faces this problem
that gets in line 123 isn''t work
note:
the project should be totally in c

展开 | 选择 | Wrap | 行号

推荐答案

使用fgets()代替of gets()
Use fgets() instead of gets()


如何在没有文件的情况下使用它
how to use it with out a file


控制台,命令提示符下有文件句柄,可以通过它来访问它:


标准输出 - 标准输出流,通常缓冲

stderr - 错误输出流通常是无缓冲的

stdin - 标准输入流,通常缓冲


要使用fgets来读取用户输入而不是使用,请使用文件句柄stdin

The console, command prompt has file handles through which it is accessed:

stdout - the standard output stream, normally buffered
stderr - the error output stream normally unbuffered
stdin - the standard input stream, normally buffered

To use fgets to read user input instead of the using gets you use the file handle stdin

展开 | 选择 | Wrap | 行号


这篇关于得到(不管)在某些地方不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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