Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Loops 循环通过字符[]_Loops_Char - Fatal编程技术网

Loops 循环通过字符[]

Loops 循环通过字符[],loops,char,Loops,Char,你们大家还有一个问题。我有: *pmessage=“现在是时候了” 然后我打印它: 对于(;*pmessage!='\0';pmessage++) printf(“%s%c\n”,“字符串为:”,*pmessage) 但当我再次尝试打印它时,我得到空值。循环完成后,如何将pmessage重置为char[]的开头 再次感谢

你们大家还有一个问题。我有:

*pmessage=“现在是时候了”

然后我打印它: 对于(;*pmessage!='\0';pmessage++) printf(“%s%c\n”,“字符串为:”,*pmessage)

但当我再次尝试打印它时,我得到空值。循环完成后,如何将pmessage重置为char[]的开头

再次感谢