Variable type is not user defined type

In reply to Swetha E:

The code you have shown is missing semicolons, but there are probably other problems with the code you have not shown.