gpt4 book ai didi

c++ - 程序正在跳过 getline ()/C++

转载 作者:行者123 更新时间:2023-11-28 05:22:25 25 4
gpt4 key购买 nike

<分区>

每当我尝试运行这段代码时:

string title;
int Choice;
cout<<"1. Insert new term ";
cin>>Choice;
if (Choice==1)
{
getline(cin,title);
}

程序只读取 Choice 并结束整个过程 :/,请帮忙 :D

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