vendredi 16 juillet 2021

function ctime_r is compiling successfully with g++ compiler (g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23.0.1)) But, it gives an error

clock = ctime_r(&heure, buf, sizeof(buf)); This function ctime_r is compiling successfully with g++ compiler (g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23.0.1))

But, it gives an error as below when compiled using g++ (GCC) 4.9.4 error: too many arguments to function ‘char* ctime_r(const time_t*, char*) clock = ctime_r(&heure, buf, sizeof(buf)); ^

Can you please let me know whether the definition ctime_r(&heure, buf, sizeof(buf)) was valid before? Because, I am able to find the documentation only on ctime_r(&heure, buf) that requires only two arguments and unable to find the documentation for ctime_r that could take 3 arguments.

Aucun commentaire:

Enregistrer un commentaire