gpt4 book ai didi

c++ - 在 中使用 _getch(),意义在 "_"

转载 作者:太空宇宙 更新时间:2023-11-04 13:56:47 25 4
gpt4 key购买 nike

所以我正在自学 C++,然后我遇到了 conio.h

我经常遇到 cin.get() 的问题,有时我不得不复制它以保持控制台打开...

代码:

// ConsoleApplication2.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
#include <conio.h>


int _tmain(int argc, _TCHAR* argv[])
{
std::cout << "Hi" ;
_getch();
return 0;
}

“_getch()”的“_”部分背后的意义是什么?

最佳答案

要获得较长的技术性答案,请参阅此答案。 ——约阿希姆·皮勒博格

https://stackoverflow.com/a/228797/440558

关于c++ - 在 <conio.h> 中使用 _getch(),意义在 "_",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21093001/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com