diff --git a/Chapter 1/1.5.cpp b/Chapter 1/1.5.cpp index 193c29f..9300a36 100644 --- a/Chapter 1/1.5.cpp +++ b/Chapter 1/1.5.cpp @@ -1,5 +1,6 @@ #include #include +#include using namespace std; @@ -17,13 +18,13 @@ void replaceSpaces(string &s){ int main(){ - int t; + int t=0; cin >> t; while (t--){ - string s; - getline(cin, s); - replaceSpaces(s); - cout << s << endl; + string s; + getline(cin, s); + replaceSpaces(s); + cout << s << endl; } return 0; }