Turbo-C
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
터보-C 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
Lua 게시판
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C/C++ Q/A
[6467] Re:Re:[만해] rad2010 ostream에 대해서...
강재호.만해 [greenuri] 4630 읽음    2009-11-01 12:20
린아 내가 어제 밤에 졸면서 책 보다 보니 햇깔렸나 보다 ^^

아래 코드 정상 동작하네 ^^ ㅋ


//---------------------------------------------------------------------------
#include <iostream>
#pragma hdrstop
#include <string>
#include <tchar.h>
//---------------------------------------------------------------------------
using namespace std;
#pragma argsused
int _tmain(int argc, _TCHAR* argv[])
{
    std::string  str;
    std::wstring wstr;

    str.append("this is String");
    wstr.append(L"this is wideString");

    std::cout << str << std::endl;
    std::wcout << wstr << std::endl;
    return 0;
}



Lyn 님이 쓰신 글 :
: 윗분 말대로 안되는게 정상적 ~_~
:
: using namespace std; 를 선언하던가
:
: 아니면 string, cout, endl, wstring 앞에 전부 std::를 붙이던가
:
:
: 강재호.만해 님이 쓰신 글 :
: : string str;
: : str.append("test");
: : std::cout << str << endl;
: : wstring wstr;
: : wstr.append(L"test");
: : std::wcout << wstr.c_str() << endl;
: :
: : 가장 일반적인 코드인데요...
: :
: : std::cout << str << endl; 이 코드가 오률를 발생 시키네요..
: : [BCC32 Error] main.cpp(30): E2094 'operator<<' not implemented in type 'ostream' for arguments of type 'string'
: :   Full parser context
: :     main.cpp(13): parsing: int wmain(int,wchar_t * *)
: :
: : Builder6나 Turbo C++에서는 오류가 발생이 안되는데 왜 이런건지 모르곘네요..
: :
: : 혹시나 아시는 분 답변 부탁 드립니다 ^^

+ -

관련 글 리스트
6464 [만해] rad2010 ostream에 대해서... 강재호.만해 5921 2009/11/01
6466     Re:[만해] rad2010 ostream에 대해서... Lyn 5130 2009/11/01
6467         Re:Re:[만해] rad2010 ostream에 대해서... 강재호.만해 4630 2009/11/01
6468             Re:Re:Re:[만해] rad2010 ostream에 대해서... Lyn 10911 2009/11/01
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.