If you want help when you receive an error message when trying to compile or link it is customary to let your potential helpers know the type of error you're dealing with (as opposed to the generic proclamation "it doesn't work") and also supply them with the exact text of the error which generally includes things like line numbers, function names and other helpful information like a brief description of what the compiler expected to be there.
You have some pretty basic syntax errors that I'm sure you could remedy yourself if you re-read whatever material you're learning from. Also, the definintion of rec doesn't match the forward declaration of rec, and there should be no loop in rec.