Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我收到错误:警告:格式参数不是指针(参数 2)
用这条线:printf("%s \n", *(group_list->name));
printf("%s \n", *(group_list->name));
考虑到名称是指向字符的指针,我不明白为什么这是一个问题。使用s有问题吗?我必须使用不同的说明符吗?
改用这个:
printf("%s \n", group_list->name);
s转换说明符期望 achar *不是char.
s
char *
char
重新阅读了一些关于 php 基础知识的内容,以刷新一些内容并在编码时更准确,我尝试<?使用 print 函数打印字符串,但发现我找不到方法。
<?
我有点困惑,因为阅读了单引号和双引号之间的区别,我认为在单引号字符串中唯一需要特殊处理的字符是反斜杠和单引号(如 O'Reilly 文献中所示)。
当然,这<?不是任何类型的字符串,但我想知道如