#include <iostream>
using namespace std;

struct Tuna{

	int x = 50;
	 Tuna() : x(200){
		
	}

	 Tuna &foo(){
		 return *this; //return type is reference to Tuna class
	 }


	 /****************
	 
	 Returns a new object made by copying the current object

	 *****************/
	 Tuna bar(){ 
		 return *this;
	 }
	 void set(int value) { x = value; }

};
int main(){

	// a pointer to class
	Tuna tt;
	Tuna *foobar = &tt;
	foobar->set(20);
	cout << foobar->x << endl;



	Tuna t;
	t.foo().set(1);
	cout << t.x << endl;


	system("pause");

	return 0;

}