Quote:
Originally Posted by Wim Sturkenboom
According to the error message, for(int i=0;i<len_string;i++) is not allowed.
Declare your counter (i) at the beginning of the function and remove the bold part from the for-loop.
As far as I know, the construction that you use is C++ and not C; I might however be mistaken here.
PS there is dedicated programming section on LQ. Your question probably fits better in there; you can report your post and request it to be moved (if you agree with the suggestion).
|
Here are the error messages i am seeing
split_field.c: In function âbuild_field_infoâ:
split_field.c:370: error: âcaddr_tâ undeclared (first use in this function)
split_field.c:370: error: (Each undeclared identifier is reported only once
split_field.c:370: error: for each function it appears in.)
split_field.c:370: error: syntax error before numeric constant
split_field.c: At top level:
split_field.c:686: error: syntax error before numeric constant
split_field.c:686: warning: type defaults to âintâ in declaration of âPrintâ
split_field.c:686: error: conflicting types for âPrintâ
general.h:59: error: previous declaration of âPrintâ was here
split_field.c:686: warning: data definition has no type or storage class
split_field.c: In function âbuild_param_infoâ:
split_field.c:757: error: assignment of read-only location
split_field.c:758: error: assignment of read-only location
split_field.c:777: warning: assignment makes integer from pointer without a cast
split_field.c:783: warning: passing argument 1 of âstrcpyâ from incompatible pointer type
split_field.c:757: confused by earlier errors, bailing out