파일에서 정보를 읽으면 수정해서 파일을 만들어서 출력하는건데
다 됨 진짜 다 되는데
공백 때문에 미치겠으뮤ㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠ
파일 내용이
Sun Dong-Ryul
27
45000
14
5
2
8
2.37
Ryu Hyun-Jin
99
68000
18
7
0
2
1.88
이렇게 있으면
출력에서 Ryu Hyun-Jin에 R이 짤려서 나온디
while(!p_instream.eof())
{
p_instream.getline(name, 20);
p_instream>>number>>thisYearSalary>>numWins>>numLosts>>numHolds>>numSaves>>ERA;
nextYearSalary = 0.5*thisYearSalary + 1500*numWins - 200*numLosts
+ 100*numHolds + 500*numSaves + 10000*(1/ERA);
p_outstream<<number<<" "<<name<<endl
<<"This year salary: "<<thisYearSalary<<endl
<<"Next year salary: "<<nextYearSalary<<endl<<endl;
}
공백이 문젠건 알겠는데 아무리 머리를 쥐어짜도 해결이 안된다
신의 한수좀 부탁해도 되나여 햄들
정보가 모자라면 댓글 ㄱㄱ
실시간 대기 할께
댓글 0