changing parameter of a function..

This is a discussion on changing parameter of a function.. within the C Programming forums, part of the General Programming Boards category; if i have a root in the signature of a function what has int value node* next in it can ...

  1. #1
    Banned
    Join Date
    Oct 2008
    Posts
    1,535

    changing parameter of a function..

    if i have a root in the signature of a function what has
    int value
    node* next
    in it

    can i use func( node *root) here in order to change the value integer
    or func( node **root)
    ??

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    I wonder, how it came that having more than 1000 posts you still cannot write a questing to be understand by others?

    if you have a struct
    Code:
    struct node
    {
       int value;
       struct node* next;
    };
    to change a value enough to pass pointer to struct

    void func(struct node* current);
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    but it changes the value of the parameter
    we need **

  4. #4
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    Quote Originally Posted by transgalactic2 View Post
    but it changes the value of the parameter
    we need **
    If you know better, why do you still ask questions? Stop spamming
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  5. #5
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    i know that we cant change the parameter thats why we use

    ** root

    so we use it when we what to change the address of the root

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 28
    Last Post: 07-17-2006, 12:35 AM
  2. Bisection Method function value at root incorrect
    By mr_glass in forum C Programming
    Replies: 3
    Last Post: 11-10-2005, 09:10 AM
  3. Change this program so it uses function??
    By stormfront in forum C Programming
    Replies: 8
    Last Post: 11-01-2005, 08:55 AM
  4. Replies: 3
    Last Post: 03-04-2005, 02:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21