J
jalkadir
WinXP P3 MinWing-GCC-3.4.3
When compiling the program below, I get a message that reads:
wcout' is not a member of `std'
What am I doing wrong?
This message popping up too often!!
TIA
#include <cstdlib>
#include <iostream>
#include <wchar.h>
#include <vector>
using namespace std;
// This C function is the combined effort of the folks from
// comp.lang.c++
// Special thanks to John Harrison for his outstnding
// partisipation
std::wstring ctow(const char* src){
std::vector<wchar_t> dest(CHAR_MAX);
int i = mbstowcs(&dest[0], src, strlen(src));
return std::wstring(&dest[0]);
}
int main(int argc, char *argv[])
{
const char* str = "hola";
std::wstring wstr;
wstr = ctow(str);
std::wcout << wstr ;
std::cout << std::endl;
system("PAUSE");
return EXIT_SUCCESS;
}
When compiling the program below, I get a message that reads:
wcout' is not a member of `std'
What am I doing wrong?
This message popping up too often!!
TIA
#include <cstdlib>
#include <iostream>
#include <wchar.h>
#include <vector>
using namespace std;
// This C function is the combined effort of the folks from
// comp.lang.c++
// Special thanks to John Harrison for his outstnding
// partisipation
std::wstring ctow(const char* src){
std::vector<wchar_t> dest(CHAR_MAX);
int i = mbstowcs(&dest[0], src, strlen(src));
return std::wstring(&dest[0]);
}
int main(int argc, char *argv[])
{
const char* str = "hola";
std::wstring wstr;
wstr = ctow(str);
std::wcout << wstr ;
std::cout << std::endl;
system("PAUSE");
return EXIT_SUCCESS;
}