Click here to Skip to main content
15,885,954 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Changing Special folders' location Pin
Gavin Taylor12-Feb-06 14:02
professionalGavin Taylor12-Feb-06 14:02 
Questionstd::string and UNICODE Pin
PJ Arends11-Feb-06 13:58
professionalPJ Arends11-Feb-06 13:58 
AnswerRe: std::string and UNICODE Pin
George L. Jackson11-Feb-06 15:25
George L. Jackson11-Feb-06 15:25 
GeneralRe: std::string and UNICODE Pin
PJ Arends11-Feb-06 15:58
professionalPJ Arends11-Feb-06 15:58 
GeneralRe: std::string and UNICODE Pin
George L. Jackson11-Feb-06 16:15
George L. Jackson11-Feb-06 16:15 
GeneralRe: std::string and UNICODE Pin
George L. Jackson11-Feb-06 16:32
George L. Jackson11-Feb-06 16:32 
GeneralRe: std::string and UNICODE Pin
George L. Jackson11-Feb-06 16:39
George L. Jackson11-Feb-06 16:39 
GeneralRe: std::string and UNICODE Pin
PJ Arends11-Feb-06 18:47
professionalPJ Arends11-Feb-06 18:47 
I decided to roll my own. It may not be perfect but I thought I would post here for posterity's sake.
// tstl.h - header file for TCHAR equivalents of STL string classes
 
#pragma once
 
namespace std
{
#if defined UNICODE || defined _UNICODE
 
    typedef wstring         tstring;
 
    typedef wstringbuf      tstringbuf;
    typedef wstringstream   tstringstream;
    typedef wostringstream  tostringstream;
    typedef wistringstream  tistringstream;
 
    typedef wstreambuf      tstreambuf;
 
    typedef wistream        tistream;
    typedef wiostream       tiostream;
 
    typedef wostream        tostream;
 
    typedef wfilebuf        tfilebuf;
    typedef wfstream        tfstream;
    typedef wifstream       tifstream;
    typedef wofstream       tofstream;
 
    typedef wios            tios;
 
#   define tcerr            wcerr
#   define tcin             wcin
#   define tclog            wclog
#   define tcout            wcout
 
#else // defined UNICODE || defined _UNICODE
 
    typedef string          tstring;
 
    typedef stringbuf       tstringbuf;
    typedef stringstream    tstringstream;
    typedef ostringstream   tostringstream;
    typedef istringstream   tistringstream;
 
    typedef streambuf       tstreambuf;
 
    typedef istream         tistream;
    typedef iostream        tiostream;
 
    typedef ostream         tostream;
 
    typedef filebuf         tfilebuf;
    typedef fstream         tfstream;
    typedef ifstream        tifstream;
    typedef ofstream        tofstream;
 
    typedef ios             tios;
 
#   define tcerr            cerr
#   define tcin             cin
#   define tclog            clog
#   define tcout            cout
 
#endif // defined UNICODE || defined _UNICODE
} // namespace std




"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

"Obviously ???  You're definitely a superstar!!!" - mYkel - 21 Jun '04

"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05

Within you lies the power for good - Use it!

-- modified at 2:20 Sunday 12th February, 2006- 12 Feb '03

"Obviously ???  You're definitely a superstar!!!" - mYkel - 21 Jun '04

"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05

Within you lies the power for good - Use it!

-- modified at 1:28 Sunday 12th February, 2006
GeneralRe: std::string and UNICODE Pin
Jörgen Sigvardsson11-Feb-06 22:26
Jörgen Sigvardsson11-Feb-06 22:26 
GeneralRe: std::string and UNICODE Pin
George L. Jackson12-Feb-06 3:46
George L. Jackson12-Feb-06 3:46 
AnswerRe: std::string and UNICODE Pin
Stephen Hewitt11-Feb-06 16:36
Stephen Hewitt11-Feb-06 16:36 
AnswerRe: std::string and UNICODE Pin
Rob Caldecott12-Feb-06 5:42
Rob Caldecott12-Feb-06 5:42 
QuestionCArray GROWING........ Pin
RockyJames11-Feb-06 11:04
RockyJames11-Feb-06 11:04 
AnswerRe: CArray GROWING........ Pin
John R. Shaw12-Feb-06 4:46
John R. Shaw12-Feb-06 4:46 
QuestionAnother question about binary files... Pin
Lord Kixdemp11-Feb-06 10:55
Lord Kixdemp11-Feb-06 10:55 
AnswerRe: Another question about binary files... Pin
John R. Shaw12-Feb-06 5:19
John R. Shaw12-Feb-06 5:19 
GeneralRe: Another question about binary files... Pin
Lord Kixdemp12-Feb-06 6:52
Lord Kixdemp12-Feb-06 6:52 
GeneralRe: Another question about binary files... Pin
John R. Shaw12-Feb-06 7:20
John R. Shaw12-Feb-06 7:20 
GeneralRe: Another question about binary files... Pin
Lord Kixdemp12-Feb-06 7:28
Lord Kixdemp12-Feb-06 7:28 
QuestionCArray - How to implement Multidimensional arrays? Pin
RockyJames11-Feb-06 8:04
RockyJames11-Feb-06 8:04 
AnswerRe: CArray - How to implement Multidimensional arrays? Pin
Kevin McFarlane11-Feb-06 8:39
Kevin McFarlane11-Feb-06 8:39 
GeneralRe: CArray - How to implement Multidimensional arrays? Pin
RockyJames11-Feb-06 8:50
RockyJames11-Feb-06 8:50 
AnswerRe: CArray - How to implement Multidimensional arrays? Pin
Gary R. Wheeler12-Feb-06 4:49
Gary R. Wheeler12-Feb-06 4:49 
QuestionHow to get a VC++.Net (2003) AddIn working? Pin
Axter11-Feb-06 6:51
professionalAxter11-Feb-06 6:51 
QuestionWriting std::string to a binary file? Pin
Lord Kixdemp11-Feb-06 6:43
Lord Kixdemp11-Feb-06 6:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.