Search:

Type: Posts; User: rpc2005

Search: Search took 0.01 seconds.

  1. Thread: macros

    by rpc2005
    Replies
    23
    Views
    4,065

    Thanks for the tip :)

    Thanks for the tip :)
  2. Thread: macros

    by rpc2005
    Replies
    23
    Views
    4,065

    Thanks for ur solution! :)

    Thanks for ur solution! :)
  3. Thread: macros

    by rpc2005
    Replies
    23
    Views
    4,065

    Thanks for your help :)

    Thanks for your help :)
  4. Thread: macros

    by rpc2005
    Replies
    23
    Views
    4,065

    sorry, i confussed you. i wanted the t enter in...

    sorry, i confussed you. i wanted the t enter in the swap() to be the type t of the a and b arguments. Is it possible to do something like that?
  5. Thread: macros

    by rpc2005
    Replies
    23
    Views
    4,065

    i see, so is this correct? #define swap(t,...

    i see, so is this correct?


    #define swap(t, a, b) (t temp=a; a=b; b=temp;)
  6. Thread: macros

    by rpc2005
    Replies
    23
    Views
    4,065

    Well, i just know to write a function like...

    Well, i just know to write a function like this...


    #define isBigger(a,b) (((a) > (b))? (a):(b))


    But i'm not sure how to do a swap function...
  7. Thread: macros

    by rpc2005
    Replies
    23
    Views
    4,065

    It's not a homework assignment. I just started C...

    It's not a homework assignment. I just started C programming and i wanted to know how to write functions in macro that can allow any data type that's all.
  8. Thread: macros

    by rpc2005
    Replies
    23
    Views
    4,065

    macros

    Hi, could anyone help me please? i'm not sure how to write a swap(t, x, y) macro that interchange the x and y arguments of type t... :confused:

    Thanks;
  9. Replies
    7
    Views
    8,950

    thx for the advise. :) But how about if the...

    thx for the advise. :)

    But how about if the node just hold a pointer to struct from the main program? As void* pointer can point to any data type we want and later when i walk through the...
  10. Replies
    9
    Views
    2,184

    could try to use isdigit()

    could try to use isdigit()
  11. Replies
    7
    Views
    8,950

    Thx guys... i'll try to understand the sample. ...

    Thx guys... i'll try to understand the sample.
    And yeah i know i should have a struct like that
    but i'm not sure what should i do when i write the add function...

    i wanted to pass instances of...
  12. Replies
    7
    Views
    8,950

    Generic linked list

    Could anyone help me by giving some sample codes of how to write a generic linked list using Void* pointers? i don' t understand how it works and i'm stucked at my assignment...

    :confused:
Results 1 to 12 of 14