https://youtu.be/kAsnMlsB_Ks

 

#include <iostream>
class CMyOStream
{
public:
	CMyOStream& operator << (int _idata)
	{
		wprintf(L"%d", _idata);
		return *this;
	}

	CMyOStream& operator << (const wchar_t* _pString)
	{
		wprintf(L"%s", _pString);
		return *this;
	}
	
	CMyOStream& operator << (void(*_pFunc)(void))
	{
		_pFunc();
		return *this;
	}

	CMyOStream& operator >> (int& _idata)
	{
		scanf_s("%d", &_idata);
		return *this;
	}

};

CMyOStream mycout;

int main()
{
	setlocale(LC_ALL, "korean");
	_wsetlocale(LC_ALL, L"korean");

	
	mycout << 20 <<L" " <<L" " << 30 << L"한글" << MyEndL;

	return 0;
}

+ Recent posts