The clang-tidy
program shows me a hint and I don't know what it means:
#include <stdio.h>
int main() {
// Initializing:
char userName[12];
int userDOB;
// Developing:
printf("-------------------------------------------------------------\n");
// Taking the userName:
printf("PLEASE ENTER YOUR USER-NAME:");
scanf("%s", userName);
// Taking the userDOB:
printf("PLEASE ENTER YOUR USER-DOB:");
scanf("%i", &userDOB);
printf("--------------------------\n");
// Printing data:
printf("USER-NAME: %s \n", userName);
printf("USER-DOB: %i \n", userDOB);
printf("-------------------------------------------------------------\n");
return 0;
}
The hint is:
Clang-Tidy: 'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead
This occurs in the scanf of the userDOB.