#include <string>
#include <sstream>
#include <fstream>
int main()
{
const std::string inputFile = "C:\\here\\input.txt";
const std::string outputFile = "C:\\here\\output.txt";
std::ifstream input;
std::ofstream output;
input.open(inputFile);
output.open(outputFile);
std::string line;
bool flag = false;
while(!input.eof() ){
flag = false;
getline(input, line);
std::stringstream lineStream(line);
for( int i = 0; i < line.length(); i++){
if( line[i] < 0 || line[i] > 127 ){ flag = true; break; }
}
if( !flag )
output << line <<std::endl;
}
input.close();
output.close();
return 0;
}
C::\\here 폴더에 input.txt에 자막 넣어봐
참고로 영어, 숫자 및 키보드에서 일반적으로 표현 가능한 기호 외에 특수문자 있으면 안 됨.
더 효율적이게 짜는 방법은 함 스스로 생각해봐.
이거 컴파일 오류 뜨는데? win7 64비트 ultimate, 비쥬얼 2008인데
ㄴ 응 그건 니가 소스를 줘도 못 돌리는 병신이라 그래.
못 돌리는건 둘째치고 읽어보면 될텐데 읽지도 않고 안 돌아간다고 징징대니 이새끼가 진짜 컴공 졸업반은 맞는지 의뭉스럽다
키야! 인서울 컴공 클라스!!!