我正在尝试创建客户端的动态数组,但没有成功。这是我的密码。当我运行这个代码时,输出是
3
� H
3
4332
3
8939
我想这是打印记忆的东西,但我不知道为什么。我把我的代码放在这里
int client_counter = 0;
typedef struct client
{
char *pid;
char *message;
}Client;
void store (Client * client_array, char *buf)
{
Client c;
c.pid = strdup (strtok (buf, ":"));
c.message = strdup (strtok (NULL, "