cygwin gcc 3.4.4 에서 std:stringstream 사용할 때, operator << 에 대해서
글쓴이: kangmuk1 / 작성시간: 목, 2009/10/08 - 11:59오전
#include
#include
#include
int main() {
int i = 1000;
std::string theString = "Test Word";
std::stringstream theStream;
theStream << theString;
theStream << i;
std::cout << theStream.str() << std::endl;
return 0;
}
=========================================================
제가 원하는 결과는
Test Word1000
이렇게 나와야 하는데요.
cygwin, gcc 3.4.4 에서 컴파일을 해보니
1000 Word
라고 출력이 되어버리네요.
stringstream의 operator << 가 처음부터 다시 덮어서 저장되는데,
이것 gcc 3.4.4의 버그인건가요?
VC나 Linux gcc 4.3.3 버젼에서는 앞의 결과로 나와서요.
Forums:


댓글 달기