I try to compile this little simple program, but i get "debug assertion failed", can someone explain why?
#include <stdio.h>
#include <stdlib.h>
#define answer 3.14
void main(int argc, char **argv)
{
float a = strtod(argv[1], 0);
printf("You provided the number %f which is ", a);
if(a < answer)
puts("too low");
else if(a > answer)
puts("too high");
else if (a == answer)
puts("correct");
}
How to use:
Open CMD and drag this .exe into it, then write a space followed by a number and hit enter. E.g. C:\test.exe 240