[ create a new paste ] login | about

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

C++, pasted on Jul 30:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
class sample {private:int x;public:friend void fun();};

void fun()
{
  sample s;
  s.x = 100;
  std::cout<<"test";

}

int main()
{
   fun();
}


Output:
1
test


Create a new paste based on this one


Comments: