The difference between Unicode and ASCII two character environments

xiaoxiao2021-03-06  46

#include

#include

#include

Using namespace std;

#ifdef unicode

Typedef wstring astring;

Typedef wostringstream ostringstream;

#ELSE

TYPEDEF STRING ASTRING;

Typedef ostringstream ostringstream;

#ENDIF

Int WinApi _twinmain (Hinstance Hinstance,

Hinstance Hprevinstance,

PTSTR LPCMDLINE,

INT ncmdshow)

{

PTSTR str = text ("Hello");

PTSTR Message = Text ("Hello");

INT A = Lstrlen (STR);

Ostringstream Out_STR;

OUT_STR << "this is" << a << endl;

Astring s = out_str.str ();

PCTSTR P = S.c_str ();

MessageBox (NULL, P, STR, MB_OK);

Return 0;

}

转载请注明原文地址:https://www.9cbs.com/read-112481.html

New Post(0)