我有3个C++源文件,我需要从一个文件调用一个函数到另一个#include<stdio.h>main() char ch='x';fun(ch); getch2.cppvoid fun(char);{
void fun(char x)printf("theascii value of the char is %d"
听起来我需要像getch这样的东西,但我不能让它工作。我从这里得到了一个类似getch的函数:。我真的不明白里面有什么。当我说“x = getch.getch()”的时候,它会说"AttributeError: '_Getch' object has no attribute 'getch'“。它看起来也像是getch的一个东西,但是它说我需要先做initscr,然后我得到了错误"File "
我是一个c++用户,我刚开始学习python,我以前在c++中使用getch()语句获取用户输入,而不必按enter键,尽管它有一些限制……我在python中寻找类似的函数(除了需要输入键笔画的raw_input()和input()之外的任何其他函数)。如在c++中:{cout<<"You Hit A Key";
}