Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Shujia Huang authored and Shujia Huang committed Feb 9, 2022
1 parent 7a170f7 commit adcbeaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion practice/chapter06/exercise6_9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ int main() {
int contribute_num = 0;
cout << "Enter a file name: ";

getline(cin, file_name);
getline(cin, file_name); // 读一整行,行末回车符排除
in_file_handle.open(file_name.c_str());
in_file_handle >> contribute_num;
in_file_handle.get(); // 读掉空白(包括滞留在行末的回车符)
Expand Down

0 comments on commit adcbeaf

Please sign in to comment.