Click here to see the code
Here is the errors that I get:
--------------------Configuration: lab2 - Win32 Debug--------------------
Compiling...
lab2.c
lab2.c(43) : error C2143: syntax error : missing ';' before 'type'
lab2.c(44) : error C2143: syntax error : missing ';' before 'type'
lab2.c(45) : error C2065: 'temp_int' : undeclared identifier
lab2.c(45) : warning C4047: '=' : 'int ' differs in levels of indirection from 'void *'
lab2.c(46) : error C2143: syntax error : missing ';' before 'type'
lab2.c(47) : error C2143: syntax error : missing ';' before 'type'
lab2.c(52) : error C2065: 'i' : undeclared identifier
lab2.c(54) : error C2065: 'ptr' : undeclared identifier
lab2.c(54) : error C2100: illegal indirection
lab2.c(56) : error C2109: subscript requires array or pointer type
lab2.c(56) : error C2106: '=' : left operand must be l-value
lab2.c(57) : error C2100: illegal indirection
lab2.c(59) : error C2100: illegal indirection
lab2.c(61) : error C2109: subscript requires array or pointer type
lab2.c(61) : error C2106: '=' : left operand must be l-value
lab2.c(62) : error C2100: illegal indirection
lab2.c(71) : warning C4047: 'return' : 'int *' differs in levels of indirection from 'int '
Error executing cl.exe.
lab2.exe - 15 error(s), 2 warning(s)
I really don't know why I get the missing ';' errors!!! HELP!!!