struct tm problem

I receive an integer as argument for a function.
within function definition i want it to be of type struct tm.

eg..
main()
{
int a;
......
}
function(...,..,a,..)
int a;
{
struct tm tm;
if(!a)
^ time(&a);
^ memcpy(&tm,localtime(&LogTime),sizeof(struct tm));

 \}

gives me error at the line ^ why ?

What error do you face? Are the errors compile time or runtime?

compile time warning

warning: argument #1 is incompatible with prototype:
prototype: pointer to long : "/usr/include/iso/time_iso.h",
argument : pointer to int
"log2.c", : warning: argument #1 is incompatible with prototype:
prototype: pointer to const long : "/usr/include/iso/time_iso.h",

Replacing the int with long might do the trick. Or you could try typecasting...

typecasting can not be done for scalar values----it says