Source http://wenku.baidu.com/view/1f3eb740c850ad02de8041ac.html
Compilation error: Local function definitions are illegal Solution
There is no other reason for this: there is a right braces "}" missing, and the number of errors is related to the position of the function. It seems to be related to the scope or its usage frequency, the number of errors reported is not the same. It is because one function in the main application is missing one "}". The solution is: if the number of functions is small, use Ctrl +} to query them one by one. If there are too many functions, try the changes recently. It seems that there is no good method. (Generally, the error location is not the true error location. It is generally the previous function of the error location)
Syntax error: Missing '; 'before'}' missing function header (old-style formal list ?) The error prompt is missing a left braces ("{"). In this case, the number of errors is not too large, which is generally four syntax errors: Missing '; 'before '}', A missing function header (old-style formal list ?), At this time, you can check the left braces of your function. At that time, the error line is generally not a real problem, instead, a function on this is missing a left braces.
This is the issue of braces in the entire function. If there is a problem with fewer braces in the function, it will not report so many errors, and it will be easier to change.