[ create a new paste ] login | about

Link: http://codepad.org/2ETEJcEG    [ raw code | output | fork | 1 comment ]

C++, pasted on Dec 2:
class sample
{
   public:
   void show(int a)
   {
       cout<<a<<endl;
   }

   int show(int a,int b)
   {
      cout<<b<<endl;
      return b;
   }

};

int main()

{
   sample s1;
   s1.show(3);
   return 0;
}


Output:
1
3


Create a new paste based on this one


Comments:
posted by agoswami on Dec 2
Function return value can be a diffirent in function overloading

reply