gpt4 book ai didi

c++ - 如何从 C++ 中的字符串中调用特定字符?

转载 作者:行者123 更新时间:2023-11-27 23:26:49 24 4
gpt4 key购买 nike

<分区>

我如何记忆起第四个字符并将其从这段代码输出到屏幕上?

#include <iostream>
#include <string>
using namespace std;


int main () {
cout << "Enter word: ";
char random[99];
cin >> random;
\\right here is where I would like to output the fourth character of the string "random"
return 0;
}

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