gpt4 book ai didi

C 字符串数组

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

<分区>

Possible Duplicates:
string literal in c
Assigning strings to arrays of characters

我得到了以下代码:

char result[3][4];

result[0] = "horse";
result[1] = "pig";
result[2] = "chicken";

它不会编译说 Incompatible types in assignment。我做错了什么?

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