Hell, you're awesome!!! Could kiss you right away :D
I spent over 5 hours in solving this.
Thank you so much!!!
BTW: Does MS Visual Basic have a much better debugger than Xcode?
Type: Posts; User: Bobbel
Hell, you're awesome!!! Could kiss you right away :D
I spent over 5 hours in solving this.
Thank you so much!!!
BTW: Does MS Visual Basic have a much better debugger than Xcode?
long int isnumcheck (char *string)
{
char res[20];
char *rest=res;
strtol(string, &rest, 0);
if (string == NULL)
ggt is gcd (greatest common divisor)
it crashes with:
im to slow in typing ^^
sends the pointers of the integers to the function
edit:
lol now i see it, hell im wondering why it even worked.
i picked the strings, instead of the integers.
But ggt still doesn't work!
but doesnt
if (strcmp(rest, "")==0)
{
return 1;
}
else
yeah i changed to scanf_s
But how do i fix isnumcheck to check for Null, which would be enough or?
okay understand this, but aint i converting the whole char-array, with atoi()
my "isnumcheck" function does check if the string is NULL, it differs between 0 and NULL, and fails if string=NULL, because "rest" is in that case not empty.
I didn't understand this, but if...
ohh you're right! thx, one issue solved ;)
edit:
any tips, how making it less "naive"? :)
Is someone able to help me?
hey guys, i'm pretty new to C, worked with java before.
I thought those two languages are very similar, but the pointers are killing me:
i have to write a c-program which recognizes 5 different...