Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 32,653 of 33,346    |
|    Francis Glassborow to Martin Ba    |
|    Re: Are there any ideas out there for ch    |
|    21 Nov 12 11:56:37    |
   
   From: francis.glassborow@btinternet.com   
      
   On 16/11/2012 08:55, Martin Ba wrote:   
   > I'll keep this short:   
   >   
   > I remember reading a statement that I found to make sense that was along   
   > the lines of:   
   >   
   > Quote Unknown:   
   >> ... cout and wcout don't make sense. You should   
   >> have one (output) stream and just be able to   
   >> pass it both narrow and wide (strings) like:   
      
   I think that is missing the point. It isn't about the source but the   
   destination. Consider:   
      
   int main(){   
    int i{0};   
    cout << i << endl; //1   
    wcout << i << endl; //2   
    return 0;   
   }   
      
   Line 1 generates output differently from (or at least can do so) from   
   line 2. This is possibly more noticeable when using file streams where   
   the output needs to be in a form that can be recovered with a   
   corresponding input function/object   
      
   There is no inherent reason that cout could not handle a wstring, but it   
   would do so differently from the way that wcout would handle it.   
      
   Francis   
      
      
      
      
   --   
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
    [ comp.lang.c++.moderated. First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca