Click here to Skip to main content
11,647,828 members (62,483 online)
Click here to Skip to main content

Some useful additions for the C++ standard library

, 11 Apr 2000 74.1K 576 22
Rate this:
Please Sign up or sign in to vote.
Defines some TCHAR compatible STL elements and gives you an std::ostream to send output to the debugger windows.
  • Download source files - 3 Kb
  • This is some simple, but useful code for STL users. It defines some TCHAR compatible elements of STL:

    _tstring	- wstring or string
    _tostream	- wostream or ostream
    _tistream	- wistream or istream
    
    _tcout	- wcout or cout
    _tcin	- wcin or cin
    _tcerr	- wcerr or cerr
    _tclog	- wclog or clog
    It gives you a std::ostream to dump objects into the debugger window, some string functions and adds support for __int64 types.

    No really fancy stuff, but you may need it Smile | :)

    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here

    Share

    About the Author

    Daniel Lohmann
    Germany Germany
    Daniel Lohmann (daniel@losoft.de) is Assistant Professor at the Distributed Systems and Operating Systems department at Friedrich-Alexander-University Erlangen-Nuremberg, Germany. His main research topic is the design of a highly customizable and scalable operating system product line for deeply embedded systems using static configuration and aspect-oriented techniques. Before joining Universität Erlangen he worked as a freelance trainer and consultant for NT system programming, advanced C++ programming and OOA/OOD. He is interested in upcoming programming techniques like aspect-oriented programming, generative programming and C++ meta coding and has written some nice and handy tools for Windows NT which you can download at his web site.

    You may also be interested in...

    Comments and Discussions

     
    QuestionTimer events code Pin
    LLKHANBARI15-Jul-07 8:57
    memberLLKHANBARI15-Jul-07 8:57 
    Questionxsputn really needed ? Pin
    __gui_gui__27-Dec-04 6:39
    suss__gui_gui__27-Dec-04 6:39 
    AnswerRe: xsputn really needed ? Pin
    Daniel Lohmann29-Dec-04 4:34
    memberDaniel Lohmann29-Dec-04 4:34 
    GeneralRe: xsputn really needed ? Pin
    Henry Bruce30-Jul-07 8:27
    memberHenry Bruce30-Jul-07 8:27 
    QuestionI want to creat a Min heap,how can I do it? Pin
    TheWay15-Jan-03 5:17
    memberTheWay15-Jan-03 5:17 
    GeneralDon't use #define, it confuses debuggers Pin
    Ben Berck17-Jan-02 10:26
    memberBen Berck17-Jan-02 10:26 
    GeneralCode repost: fix angle brackets Pin
    Ben Berck17-Jan-02 10:31
    memberBen Berck17-Jan-02 10:31 
    Sorry, didn't catch the angle bracket problem when pasting the code.

    #include <tchar.h>
    #include <iostream>
    #include <ostream>
    using namespace std;

    typedef basic_ostream<TCHAR> tostream;
    #ifdef _UNICODE
    tostream& tcout = wcout;
    #else
    tostream& tcout = cout;
    #endif

    int main(int argc, char* argv[])
    {
    tcout << _T("Test 123");
    return 0;
    }


    Ben Berck
    Semi-retired C++ guy
    GeneralRe: Code repost: fix angle brackets Pin
    Christian Graus17-Jan-02 12:49
    memberChristian Graus17-Jan-02 12:49 
    GeneralRe: Code repost: fix angle brackets Pin
    Daniel Lohmann18-Jan-02 0:07
    memberDaniel Lohmann18-Jan-02 0:07 
    General~basic_dbgstreambuf() needs a tiny fix Pin
    Girish Zambre9-Apr-01 12:49
    memberGirish Zambre9-Apr-01 12:49 
    GeneralThe _stringf function is cool, but needs a bit more Pin
    CodeSkunk15-Nov-00 11:11
    memberCodeSkunk15-Nov-00 11:11 
    GeneralDon't use underscores. Pin
    James Curran 13-Apr-00 6:10
    sussJames Curran 13-Apr-00 6:10 
    GeneralRe: Don't use underscores. Pin
    Alvaro Mendez15-May-00 13:06
    sussAlvaro Mendez15-May-00 13:06 
    GeneralRe: Don't use underscores. Pin
    James 15-May-00 16:57
    sussJames 15-May-00 16:57 

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

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

    | Advertise | Privacy | Terms of Use | Mobile
    Web01 | 2.8.150804.4 | Last Updated 12 Apr 2000
    Article Copyright 2000 by Daniel Lohmann
    Everything else Copyright © CodeProject, 1999-2015
    Layout: fixed | fluid