#include <iostream>
typedef long mylong;

class A
{
public:

	int val;

	operator mylong ()
	{
		return (mylong)val;
	}

	operator long ()
	{
		return (long)val;
	}
};

int main ( void )
{
	A o;
	o.val = 30;

	std::cout << (mylong)o << std::endl;
	std::cout << (long)o << std::endl;
}

