called object 'char* 'type is not a function or function pointer called object 'char* 'type is not a function or function pointer xcode xcode

called object 'char* 'type is not a function or function pointer


Your function parameter time is a pointer to a char.

However, in your function body, you're trying to treat it if it were a function that you can call. That's what the error is saying...

the object of type char * is not a function or a function pointer [therefore, I can't call it!]

Essentially, you've hidden the time function by having a local variable of the same name. I'd recommend changing your function parameter's name.


The function parameter

static void timeStamp(char* time){  time(&strTime);<---ERROR  // ...}

shadows the time() function. Rename the parameter.


static void timeStamp(char* time)  

here, this char* time parameter is hidding the function time().you will need to rename it.