1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char *argv[]) {
wstring strwM = L"test wchar";
std::wcout << strwM << endl;
char car;
wchar_t wcar;
cout << "Taille de car = " << sizeof(car) << endl;
cout << "Taille de wcar = " << sizeof(wcar) << endl;
//
cout << "Longueur de la chaine strwM : "
<< strwM.length() << endl;
for (unsigned int nI = 0; nI < strwM.length(); ++nI) {
wcar = strwM[nI];
wcout << nI << " : " << wcar << endl;
}
system("PAUSE");
}// main |