본문 바로가기

전체 글92

Input / Output Stream c++은 입력과 출력을 a stream of bytes로 본다. 입력에서는 프로그램은 입력 스트림에서 byte를 추출한다. 출력에서는 프로그램은 출력 스트림에 bytes를 삽입한다. 입력스트림의 byte 보통 키보드를 통해, 또는 저장장치나 다른 프로그램을 통해 입력된다. 출력스트림의 byte는 보통 display 나 printer, 저장장치 또는 다른 프로그램으로 흘러간다. stream은 프로그램과 소스 또는 목적지 사이의 중계자 역할을 한다. 장점 : 프로그램에서는 단지 입력이 어디에서 온 것에 대해서 알 필요 없이 stream에서 byte를 추출하면 된다. 프로그램은 출력도 역시 어디로 출력할지 알 필요 없이 stream에 byte를 출력하면 된다. 2019. 7. 13.
std::vector std::vector: 동적 크기 array를 기능을 가진 sequence container 특징 vector안의 element가 연속적으로 저장 interator뿐 아니라 일반 pointer를 이용하여 element에 접근 vector안의 element에 대한 크기가 자동적으로 확장된다. member function https://en.cppreference.com/w/cpp/container/vector 2019. 6. 23.
Exception runtime에 발생하는 문제를 처리 ex) 존재하지 않은 파일을 열 때 충분하지 않은 메모리에서 더 많은 메모리를 요구할 때 유효하지 않은 값을 사용할 때 보통 위의 경우에 해결방법 abort() 호출 Error code를 return exception from c++ primer plus 2019. 5. 25.
c++ and resource https://isocpp.org/ Standard C++ isocpp.org http://www.cplusplus.com/ cplusplus.com - The C++ Resources Network www.cplusplus.com https://pocoproject.org/ POCO C++ Libraries - Simplify C++ Development The POCO C++ Libraries are powerful cross-platform and open source C++ class libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT and embedded sy.. 2019. 5. 2.