title: Passing input as a function argument using cin
body: <p>My program:</p>
  
  <pre><code>class test
  {
      int k;
      public:
      void changeval(int i){k=i;}
  };
  int main()
  {   
      test obj; 
      int i;
      cin&gt;&gt;i;
      obj.changeval(i);
      return 0;
  }
  </code></pre>
  
  <p>Is there any way, by which i can directly pass input from the user as an argument to the function changeval(int), without even initializing value to i??</p>
  
  <p>I mean, i don't want to declare a variable just to pass value to a function. Is there any way i can avoid it? If yes, can I use it for constructors also? Thanks.  </p>