Getch()不工作? [英] Getch() is not working?

查看:77
本文介绍了Getch()不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在为我的程序使用DEV C ++。我将文件发送给我的朋友,但是当他运行它时,它根本不起作用。他说因为getch()。但是当我运行该程序时,它完全正常工作。



我尝试过:



我还没有尝试任何东西,因为我的朋友有点远。我们只在上学期间看到,现在我们正在休假

Hello, I'm using a DEV C++ for my program. I send the file to my friend but when he run it, it wasn't working at all. He said "because of getch()". But when I run the program it is totally working.

What I have tried:

I haven't tried anything yet because my friend is kinda far away. We only see during school days and right now we are on a holiday break

推荐答案

你应该避免使用 getch ,它是一个非标准的 C / C ++ 函数。作为替代方案,请查看 cin.get ,但这实际上取决于您的具体情况(您没有报告)。
You should avoid using getch, it is a not standard C/C++ function. As an alternative, have a look at cin.get, but it really depends on your exact scenario (you didn't report it).


我们无法回答这个问题;甚至开始 - 我们看不到代码,我们看不到你的屏幕,我们看不到你朋友的屏幕,我们无法访问你的硬盘,我们无法读懂你的任何一个想法! br />


您和您的朋友需要学习如何报告问题,以及如何提出问题:此刻,您已经在不知名的地方发生故障,称为车库(我们)并说它不起作用。我的朋友说它绕了一下并把手机放下。

你认为它会在车库到达之前多长时间用合适的零件来修理你的车吗?



试试这里:提出技术问题的提示,这些技巧问题可以产生快速有用的解决方案Opensource.com [ ^ ]然后自己想一想我的朋友实际上告诉了我多少?它表现出了什么症状?为什么他认为这是'因为getch()'?

如果他没有给你任何真实的信息,是什么让你认为其他人可以帮助你更少?
We can't answer that; or even begin to - we can't see the code, we can't see your screen, we can't see your friend's screen, we can't access your HDD, and we can't read either of your minds!

You and your friend need to learn how to report a problem, and how to ask a question: at the moment, you have broken down in the middle of nowhere, called the garage (us) and said "It don't work. My friend says it the bit which goes round" and put the phone down.
How long do you think it will be until the garage arrives with the right parts to fix your car?

Try reading here: Tips for asking technical questions that result in fast, useful solutions | Opensource.com[^] and then think to yourself "how much did my friend actually tell me? What symptoms did it show? Why does he think it's 'because of getch()'?"
If he didn't give you any real info, what makes you think that anyone else can help you with even less?


这篇关于Getch()不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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