Pass value from an Inline Function to another Inline Function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lalala
    New Member
    • Apr 2007
    • 9

    Pass value from an Inline Function to another Inline Function

    i need to pass a value from a function with alot of stuffs.. to another function with alot of stuffs also.. just a single value... something like below..

    void main
    {

    }

    void value()
    {
    alot of stuff inside here;
    }

    void passvalue()
    {
    alot of stuff inside here also ...
    i just want to pass a value like... int Number = 5; the value 5 to the function void value() from this function...
    }

    any1? using pointer?? i not good at it.. can some1 show me the way..

    thanks..
  • cbbibleboy
    New Member
    • Apr 2007
    • 29

    #2
    I'm not exactly sure what you are asking. It seems like your talking about function parameters, but I'm not sure. Please clarify...

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Read up on how to write functions.

      Functions receive information through arguments. You pass information by supplying an argument.

      To pass int information to the value function you need an int arguiment:
      Code:
      void value(int arg)
      {
      
      }
      Then you can call this function by supplying the argument:
      Code:
      value(5);
      int y = 10;
      value(y);
      Good luck.

      Comment

      Working...