I am trying to make a function prints every letter that is passed to it, but does so slowly.
Below is the function, but when I call it, it simply prints the whole message string (as it should do as a test at the top of the function). but it does not print the letters of the message string as I expect it to.
I tried working out what was going on by printing the size of the string vector I create while tokenising, and it says the size is 0 (so I am assuming that the actual tokenising is going wrong), can anyonne help? =]
I don't know what you think that strtok_s() is supposed to do but don't use it anyway there're always better approaches to solve your problem like this:
1 2 3 4 5 6
for(unsignedint i = 0; i < message.size(); i++)
{
printf("%c", message[i]);
Sleep(400);
}
printf("\n");