/*
* Hello.cpp
* Copyright (c) 2009 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
#include <sol/Object.h>
#include <sol/String.h>
namespace SOL {
class Hello :public Object {
private:
String string;
public:
Hello(const TCHAR* message)
:string(message)
{
}
public:
void display()
{
_tprintf(_T("%s\n"), (const TCHAR*)string);
}
};
}
void _tmain(int argc, TCHAR** argv)
{
//At first, not explicitly defined a locale
String hello = _T("Hello World. こんにちは世界"); //wchar_t string in UNICODE environment.
Hello helloWorld(hello);
helloWorld.display();
//Next, call _tsetlocale.
_tsetlocale(LC_ALL, _T(""));
helloWorld.display();
}
|