Hello,
is there a way to printf out.
what i want is explode (" ") into 1 line and no spaces.
i'll explode it with ("_")
Code:
int contents = 0;
const char *setexplodetoname[] = {};
char st[] = "Where there is will there is a way.";
char *ch;
ch = strtok(st, " ");
while (ch != NULL)
{
printf("%s\n", ch);
setexplodetoname[contents] = ch;
contents++;
ch = strtok(NULL, " ");
}
for (int i = 0; i < contents; i++)
{
printf("works.......\n");
printf("%p\n", &setexplodetoname[i]);
}
i got this here output:
Code:
works.......
0x7ffe381fa880
works.......
0x7ffe381fa888
works.......
0x7ffe381fa890
works.......
0x7ffe381fa898
works.......
0x7ffe381fa8a0
works.......
0x7ffe381fa8a8
works.......
0x7ffe381fa8b0
works.......
0x7ffe381fa8b8
i except to get the name of explode below works....)
Edit 17.25
Thanks for helping me