I'm working on a program that convert strings to integers. The code works just fine but I got this warning that I can't solve. I tried to look it up but nothing helpful was found.
Here is the simple code:
#include <stdio.h>
int main() {
char x[8] = "ABCDWXYZ";
long long sum = 0;
for (int i = 0; i < 8; i++) {
sum = sum * 100 + (long long)x[i];
}
printf("%lli", sum);
return 0;
}
Here's the warning I got:
too many arguments for format [-Wformat-extra-args] //Line 11
unknown conversion type character 'l' in format [-Wformat=] //Line 11