All pastes #717930 Raw Edit

Untitled

public text v1 · immutable
#717930 ·published 2007-09-27 23:48 UTC
rendered paste body
#include <iostream>

class foo
{
	public: int a;
};


class test2
{
public:
 test2() {f=new foo();}
 ~test2() {delete f;}
 foo* f;
};

test2 foo1()
{
}

int main(int argc, char** argv)
{
	test2 t;
	test2 c;
	t = foo1();
	std::cerr << foo1().f->a << std::endl;
	return 0;
}