Search:

Type: Posts; User: Bobbel

Search: Search took 0.01 seconds.

  1. Thread: pointer issues

    by Bobbel
    Replies
    23
    Views
    3,779

    Hell, you're awesome!!! Could kiss you right away...

    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?
  2. Thread: pointer issues

    by Bobbel
    Replies
    23
    Views
    3,779

    long int isnumcheck (char *string) { char...

    long int isnumcheck (char *string)
    {
    char res[20];

    char *rest=res;


    strtol(string, &rest, 0);

    if (string == NULL)
  3. Thread: pointer issues

    by Bobbel
    Replies
    23
    Views
    3,779

    ggt is gcd (greatest common divisor) it...

    ggt is gcd (greatest common divisor)

    it crashes with:
  4. Thread: pointer issues

    by Bobbel
    Replies
    23
    Views
    3,779

    im to slow in typing ^^

    im to slow in typing ^^
  5. Thread: pointer issues

    by Bobbel
    Replies
    23
    Views
    3,779

    sends the pointers of the integers to the...

    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!
  6. Thread: pointer issues

    by Bobbel
    Replies
    23
    Views
    3,779

    but doesnt if (strcmp(rest, "")==0) {...

    but doesnt
    if (strcmp(rest, "")==0)

    {
    return 1;

    }

    else
  7. Thread: pointer issues

    by Bobbel
    Replies
    23
    Views
    3,779

    yeah i changed to scanf_s But how do i fix...

    yeah i changed to scanf_s

    But how do i fix isnumcheck to check for Null, which would be enough or?
  8. Thread: pointer issues

    by Bobbel
    Replies
    23
    Views
    3,779

    okay understand this, but aint i converting the...

    okay understand this, but aint i converting the whole char-array, with atoi()
  9. Thread: pointer issues

    by Bobbel
    Replies
    23
    Views
    3,779

    my "isnumcheck" function does check if the string...

    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...
  10. Thread: pointer issues

    by Bobbel
    Replies
    23
    Views
    3,779

    ohh you're right! thx, one issue solved ;) ...

    ohh you're right! thx, one issue solved ;)

    edit:
    any tips, how making it less "naive"? :)
  11. Thread: pointer issues

    by Bobbel
    Replies
    23
    Views
    3,779

    Is someone able to help me?

    Is someone able to help me?
  12. Thread: pointer issues

    by Bobbel
    Replies
    23
    Views
    3,779

    pointer issues

    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...
Results 1 to 12 of 12