[ create a new paste ] login | about

Link: http://codepad.org/tWoRl7dN    [ raw code | output | fork ]

agoswami - C++, pasted on Dec 2:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class sample
{
   public:
   void show(int a)
   {
       cout<<a<<endl;
   }
   int show(int b)
   {
      cout<<b<<endl;
    }
};

int main()
{
    sample s;
    s.show();
    return 0;
}
   


Output:
1
2
Line 8: error: 'int sample::show(int)' cannot be overloaded
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: