C++ 컴파일 오류(error): variable 'std::istringstream sstream' has initializer but incomplete type

by digipine posted Nov 02, 2017
?

Shortcut

PrevPrev Article

NextNext Article

ESCClose

Larger Font Smaller Font Up Down Go comment Print
목이 조금 복잡하긴 하지만 오류를 그대로 넣은 것이다. 오류를 자세히 읽어 보면 아래와 같은 뜻이다.
 
error: variable 'std::istringstream sstream' has initializer but incomplete type
오류: 'std::istringstream sstream' 변수가 초기화 리스트를 이용하고 있지만 불완전 타입임
 
이유는 std::istringstream sstream이 클래스 선언만 되어 있고 정의가 없기 때문이다. 따라서 아래 #include 문을 추가하면 된다.
 
#include <sstream>
TAG •

Articles

1 2