You will see the problem immediately if you format your code better:
Put each { and } on separate lines
Every line between corresponding { }'s should be indented 3-4 SPACEs.
For example:
int function(int val)
{
int rtn, tmp;
if (val > 10)
{
tmp = val * 4;
rtn = tmp + val;
}
else
{
tmp = val * 6;
rtn = tmp - val;
}
return rtn;
}
Errors
--------------------Configuration: DLL - Win32 Debug-------------------- Compiling... Main.cpp error C2109: subscript requires array or pointer type error C2065: 'godmode' : undeclared identifier Error executing cl.exe. Creating browse info file... DLL.dll - 2 error(s), 0 warning(s)
Please let us know what lines these error are on. Just telling us the errors does not give us enough information (although I did find one -- this time)