#include <stdio.h>
#include <windows.h>
#include <conio.h>
#include <string>
void main()
{
UCHAR s[32]="@abcdefghijklmnopqrstuvwxyz!";
char temp[32]={0};
std::wstring strws;
memcpy(&temp[0],&s[0],sizeof(s)/sizeof(UCHAR));
std::string str=temp;
strws.assign(str.length( ),L' ' );
std::copy(str.begin( ),str.end( ),strws.begin( ));
printf("WString equivalent of UCHAR=%ls",strws.c_str( ));
getch( );
}
#include <windows.h>
#include <conio.h>
#include <string>
void main()
{
UCHAR s[32]="@abcdefghijklmnopqrstuvwxyz!";
char temp[32]={0};
std::wstring strws;
memcpy(&temp[0],&s[0],sizeof(s)/sizeof(UCHAR));
std::string str=temp;
strws.assign(str.length( ),L' ' );
std::copy(str.begin( ),str.end( ),strws.begin( ));
printf("WString equivalent of UCHAR=%ls",strws.c_str( ));
getch( );
}
No comments:
Post a Comment