[ create a new paste ] login | about

Link: http://codepad.org/s1Jl4PcY    [ raw code | output | fork ]

C++, pasted on Jul 6:
#include <iostream>
#include <string>

#ifdef _UNICODE
typedef wchar_t     TCHAR;
std::wostream& tcout = std::wcout;
#else
typedef char     TCHAR;
std::ostream& tcout = std::cout;
#endif

typedef std::basic_string<TCHAR> tstring;

void func(const std::string& t) {
    std::cout << t;
}



int main(int argc, char *argv[])
{
    tstring s = "test";
    func(s);
    return 0;
}


Output:
1
test


Create a new paste based on this one


Comments: