Thread: basic_iostream parameters

  1. #1
    Registered User
    Join Date
    Jun 2008
    Location
    Somewhere in Europe
    Posts
    99

    basic_iostream parameters

    Hello,

    I am learning about streams, and there are a few things that aren't clear to me.

    First, the definition of basic_ostream:

    Code:
    template<class charT, class traits = char_traits<charT> >
    class basic_ostream 
    :virtual public basic_ios<charT, traits>{/* ...*/};
    What does the parameter charT actually mean? What value can it take other than char and, perhaps, wchar_t?

    Are charT and traits implementation-dependent (or device-dependent?) and fixed for a given system, or can they be changed? I tried outputting to wcout (which I thought was declared in <iostream>), just to see what would happen. My compiler didn't recognise it.

    Any help would be greatly appreciated.

  2. #2
    The larch
    Join Date
    May 2006
    Posts
    3,573
    I think MinGW doesn't provide wide characters streams if that's what you are using. You may need to install another standard library implementation (STLPort) then it should work.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  3. #3
    Registered User
    Join Date
    Jun 2008
    Location
    Somewhere in Europe
    Posts
    99
    It is what I'm using. But I don't actually need to use wide stream characters - I was just fiddling around trying to see what a stream character is and what it would mean to change its type.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Parameters quick Question
    By lifeis2evil in forum C++ Programming
    Replies: 2
    Last Post: 11-18-2007, 11:12 PM
  2. function with variable number of parameters
    By mikahell in forum C++ Programming
    Replies: 3
    Last Post: 07-23-2006, 03:35 PM
  3. Additional parameters for operator delete
    By darksaidin in forum C++ Programming
    Replies: 0
    Last Post: 09-21-2003, 11:46 AM
  4. Passing parameters from VB to C++ through ActiveX DLL
    By torbjorn in forum Windows Programming
    Replies: 0
    Last Post: 12-10-2002, 03:13 AM
  5. command-line parameters.
    By Tombear in forum C Programming
    Replies: 2
    Last Post: 10-28-2001, 08:40 AM