Hi,

I've got g++ 2.9.29-0.6, the egcs compiler, and libstdc++2.8dev
2.9.29-0.6 installed.  I was playing around with some STL stuff when I
tried to declare a wstring.  No luck. 

Examining the file /usr/include/g++/string yields:

// Main header for the -*- C++ -*- string classes.

#ifndef __STRING__
#define __STRING__

#include <std/bastring.h>

exter "C++" {
typedef basic_string <char> string;
// typedef basic_string <wchar_t> wstring;
} // extern "C++"

#endif


##########
Okay - so what's up - who commented out the typedef for wstring?
Is this Debian specific or something related to gcc/egcs?
I learned STL using Microsoft's compiler and I'm new to gcc/egcs 
STL support.

Enquiring minds would like to know.
I tried declaring a basic_string<wchar_t> in my own app and it blew up
pretty badly.  

test.cpp:

#include <stdio.h>
#include <string>

main()
  {
  basic_string<char> sString;
  }

compiles okay, but adding 

basic_string{wchar_t} sString2

really causes it to blow up.  I'm using the following line to compile:

c++ -o test test.cpp

Also, shouldn't the above code require a "using namespace std" before
main, or for me to use "std::basic_string<char> sString;"  ??



Jeff

==
Jeff McWilliams ([EMAIL PROTECTED])
"The minstrel boy has gone to war,
 in the fields of death you'll find him" - author unknown


_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to