|
// tstl.h - header file for TCHAR equivalents of STL string classes
//
// Copyright (c) 2006 PJ Arends
//
// This file is provided "AS-IS". Use and/or abuse it in any way you feel fit.
//
#pragma once
#include <string>
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
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Father of two, brother of two, child of two.
Spouse to one, uncle to many, friend to lots.
Farmer, carpenter, mechanic, electrician, but definitely not a plumber.
Likes walks with the wife, board games, card games, travel, and camping in the summer.
High school graduate, college drop-out.
Hobby programmer who knows C++ with MFC and the STL.
Has dabbled with BASIC, Pascal, Fortran, COBOL, C#, SQL, ASM, and HTML.
Realized long ago that programming is fun when there is nobody pressuring you with schedules and timelines.