logo

English

이곳의 프로그래밍관련 정보와 소스는 마음대로 활용하셔도 좋습니다. 다만 쓰시기 전에 통보 정도는 해주시는 것이 예의 일것 같습니다. 질문이나 오류 수정은 siseong@gmail.com 으로 주세요. 감사합니다.

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

by digipine posted Nov 02, 2017
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

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 •

List of Articles
No. Subject Author Date Views
10 C++ Atomic 클래스에 대해서 file 엉뚱도마뱀 2017.12.13 2139
» C++ 컴파일 오류(error): variable 'std::istringstream sstream' has initializer but incomplete type digipine 2017.11.02 21077
8 Unix C/C++ Input and Output Function Reference digipine 2017.11.01 88072
7 wchar_t에 대하여 digipine 2017.11.01 7343
6 C 에서 Overloading 구현 digipine 2017.11.01 1790
5 C를 이용한 객체지향 프로그래밍 digipine 2017.11.01 568
4 Callback in C++ 와 Delegate 차이점 digipine 2017.11.01 2525
3 brute-force 알고리즘을 이용한 패턴 위치 찾기 digipine 2017.10.29 1501
2 STL MAP 예제로 공부하기 digipine 2017.10.29 5204
1 C++에서 extern의 역할, 기능 digipine 2017.10.29 2656
Board Pagination Prev 1 Next
/ 1