473,385 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

wcout' is not a member of `std'

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;
}

Oct 7 '05 #1
7 9275
jalkadir wrote:
WinXP P3 MinWing-GCC-3.4.3
What is MinWing? You mean MingW?
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!! >:(


Compiles fine with GCC 3.3.4 and 3.4.4 under Linux here.

Oct 7 '05 #2
Thanks for the help, and for putting up with my shortcomings. <:(
I will dig a bit more in this matter.

At least I know the code works, perhaps there is a problem with the
MingW implementation of GCC.
Again, thanks.

Oct 7 '05 #3
Yes, I was right. I am not the only one having this problem.
There at least one more programmer with this problem: see
http://groups.google.ca/group/comp.l...2da18abd63381b

How about Borland C/C++ compiler, does it support wstrings?

TIA

Oct 7 '05 #4
* 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!! >:(


You're not doing anything wrong. That compiler+library simply doesn't have
std::wcout.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Oct 7 '05 #5
Thanks for your reply!!
Yes, this is really terrible, I counting cigwin or MingW for this work,
but apparently BCC55 has the same problem, is there around this
problem?

TIA

Oct 9 '05 #6
"jalkadir" <ja******@gosonic.ca> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Thanks for your reply!!
Yes, this is really terrible, I counting cigwin or MingW for this work,
but apparently BCC55 has the same problem, is there around this
problem?


If you're willing to pay money, there is.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
Oct 9 '05 #7
"jalkadir" <ja******@gosonic.ca> writes:
Thanks for your reply!!
Yes, this is really terrible, I counting cigwin or MingW for this work,
but apparently BCC55 has the same problem, is there around this
problem?

TIA


You could try STLPort.
Regards, kga
Oct 10 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alex Mizrahi | last post by:
Hello, All! i admit that it's better to ask questions connected with atl/mfc classes in special newsgroups, but seems like people there are interested more in discussing stuff like MFC GUI than...
3
by: Steven T. Hatton | last post by:
There's probably something obvious I'm missing here, but I can't seem to figure out how to get this to work: ostream_iterator<wstring, wchar_t>(wcout,"\n")); When I try to compile it, I get an...
1
by: iwongu | last post by:
Hi, I have a question about std::wcout and its underlying C functions. According to C99, a stream have an orientation type that is one of byte-oriented or wide-one, and it is determined by the...
2
by: interec | last post by:
I have a simple program in which I want to read a wstring using wcin and then output the same string using wcout. The program takes a few words separated by spaces as input. The problem is that...
2
by: Ralf Goertz | last post by:
Hi, can I mix output to cout and wcout? It seems that if I write to cout first it works fine but if I start with wcout the output to cout vanishes. I assume that is has to do with the...
2
by: year1943 | last post by:
There was the same topic not so long ago, but as I see it stays w/o answer:...
10
by: Erik Knudsen | last post by:
Hi! In converting applications from ansi to unicode, it is a problem that the std::wcout accepts a const char * without complaining compile time. This compiles and runs:...
44
by: Ioannis Vranos | last post by:
Has anyone actually managed to print non-English text by using wcout or wprintf and the rest of standard, wide character functions?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.