Can't see what's wrong with the id++ part. It's not stored anywhere as far as I can see.
Interesting use of recursion. Are you sure you really know why you've used it in that way?
Good use of single character variable names. I haven't got a clue what the code is doing; the intent is absolutely impossible to determine. Very good for job security, that.
What doesn't the program do that you want? Apart from the autogenerated ID, that is.