主页->库函数目录->对话框输入函数->getChar

功能:
显示对话框,让用户输入一个字符

声明:
char getChar(LPCSTR text = "Input a character and press ENTER");

参数:
text 对话框内显示的提示文字,可以使用'\n'或者'\t'进行格式控制。

返回值:
返回用户输入的字符。

示例:

#include "graphics.h"
int main() {
  initgraph(640, 480);

  char c;
  c = getChar();
  outputxy(0, 0, x);

  ege::getch
();
  return 0;
}