std::getline在遇到eof时抛出。 |
您所在的位置:网站首页 › ifstream的getline › std::getline在遇到eof时抛出。 |
百度翻译此文
有道翻译此文
问题描述
std::getline throws exception when it gets an eof. this is how I am doing. std::ifstream stream; stream.exceptions(std::ifstream::failbit|std::ifstream::badbit); try{ stream.open(_file.c_str(), std::ios_base::in); }catch(std::ifstream::failure e){ std::cout |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |