"chandan" <> writes:
> Forgot to mention that u must typecast the calloc function as its
> return type is void * (however some compiler automatically return
> pointer type of the type_of_its_second_ argument.)
No. calloc() returns a result of type void*, but it's implicitly
converted to the target pointer type. An explicit cast is unnecessary
and can mask errors (such as forgetting the required "#include <stdlib.h>"
or compiling C code with a C++ compiler).
Please read <http://cfaj.freeshell.org/google/>, and don't use silly
abbreviations like "u" for "you".
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.