I am trying to make my own string tokenizer and I am failing miserably. Its a GPS parsing problem. I have my sample code below but I can't get it to compile. I am horrible with pointers and I have a feeling that is where the problem is. Can someone help me to work my way through this please?

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 havea default for parameter 2 and 3, you have to have one for parameter 4. Because the point of havingdefault 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 was originally going to use strtok but I read on one of the other forum threads that a known issue with strtok is that if you have empty fields it can screw it up so "data,data,data,,,data,data,,,,data" could have problems. I also had a hard time figuring out how to store the various tokens for future use. I'm not very good with pointers.....often to my detriment.

Oh my....lloyddean!!!......that just works FANTASTIC!!! And as a bonus, for once I can actually understand what you did there. That is exactly what I was trying to do. Thank you so much!!! And thank you everyone else for all of the great suggestions, all of which were incorporated in one way or another into my sketch.