Yes, for the N'th time, i am including stdlib.h
Sorry you are getting frustrated :-)
What can I say, the compiler error indicates that the compiler thinks that malloc returns int, that means that for some reason the compiler has not see the declaration of malloc possible reasons are
- stdlib.h not included, either actually no #include statement or for some reason the #include statement is not being parsed
- Include protection for stdlib.h defined before including stdlib.h
- An edit in stadlib.h has removed the declaration of malloc
- Something I can't think of.
However "assignment makes pointer from integer without a cast" is not an error that you should fix with a cast unless you are specifically expecting to have to convert an integer to a pointer.
If you post the compilable unit producing the error I will see if I can work out what it is.