本帖最后由 bin554385863 于 2019-10-17 23:53 编辑 #include <iostream>
int main(int argc, char const *argv[])
{
char arg = '0';
while ((arg = getchar()) != '\n')
{
if (!isalpha(arg))
{
std::cout << "请输入字母" << std::endl;
break;
}
else
{
putchar(arg);
}
}
return 0;
}
-------------------------------------------------
E:\Users\86184\Documents\Code>c:\Users\86184\.vscode\extensions\ms-vscode.cpptools-0.26.0\debugAdapters\bin\WindowsDebugLauncher.exe --stdin=Microsoft-MIEngine-In-5242uzf1.0cg --stdout=Microsoft-MIEngine-Out-sx5hiih2.zxr --stderr=Microsoft-MIEngine-Error-kdao2aw3.l4z --pid=Microsoft-MIEngine-Pid-orszt3rw.svq "--dbgExe=E:\My Program\MinGW\bin\gdb.exe" --interpreter=mi
0123
请输入字母
E:\Users\86184\Documents\Code>cmd /C "c:\Users\86184\.vscode\extensions\ms-vscode.cpptools-0.26.0\debugAdapters\bin\WindowsDebugLauncher.exe --stdin=Microsoft-MIEngine-In-cfkcl3zd.iox --stdout=Microsoft-MIEngine-Out-k42wqt54.g54 --stderr=Microsoft-MIEngine-Error-ha5rx422.o0k --pid=Microsoft-MIEngine-Pid-if041scy.ovb "--dbgExe=E:\My Program\MinGW\bin\gdb.exe" --interpreter=mi "
hello
hello
E:\Users\86184\Documents\Code> |