do I have to delete the array afterwards? No, the arrays (gfg and tok) will be destroyed automatically when they go out of scope. I am worried If I am doing it right It is correct for the example that you have shown, but it won't work correctly of the string can contain more tha...