Trouble manipulating comma delimited strings

well your first problem may be easy. Move the function mytok() so it is above the function loop() in the code.
So then, when the compiler gets to the occurences of mytok() inside loop(), it alreadys knows what mytok() is.
Or put a function prototype for mytok() above loop().

I think there is some funny b/s rules about having "default values" for function call parameters. If you have
a default for parameter 2 and 3, you have to have one for parameter 4. Because the point of having
default values is so you can leave them out. You can't leave out 2 and 3 and then have 4.

In some languages you can make calls like y = mytok( a , , , d ); but C++ is not one of them.

I'd avoid having default parameters. They just cause trouble.