gpt4 book ai didi

c++ - 在 C 和 C++ 中使用 char* 获取字符串输入

转载 作者:太空狗 更新时间:2023-10-29 19:46:19 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Reading string from input with space character?

我在将字符串(技术上是字符数组)作为输入时遇到问题。假设我有以下声明:

 char* s;

我必须使用这个字符指针输入一个字符串,直到我点击“输入”,请帮忙!提前致谢。

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