cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Anonymous
Not applicable
2,945 Views

Warning: Incompatible implicit declaration of built-in function 'sprintf'

I have been trying to store a format of HH:MM:SS using sprintf function in a buffer and further printing it to be seen using UART. However its showing a warning message of Incompatible implicit declaration of built-in function 'sprintf'. Is there any headerfile that needs to be included? i have included xil_printf.h . The part of the code showing warning goes like this,

 

sprintf(buffer,"%d:%d:%d",hours,minutes,seconds);

xil_printf("The time is %s /r /n", buffer);

0 Kudos
1 Reply
xilinxacct
Instructor
Instructor
901 Views
Registered: ‎10-23-2018

@Anonymous

sprintf is in stdio.h

Hope that helps

If so, please mark as solution accepted to close this issue. Kudos also welcomed. :-)

0 Kudos