|
|
back to boardA tip for C++ users who got WA!Mind the spaces! Mind the spaces! If you use cin >> s1 The spaces will be ingnored! I use this to get AC while (cin) { c = ''; c = cin.get(); if (c != '\n') s += c; } hope I can help you. Re: A tip for C++ users who got WA!Mind the spaces! hi write this statement while(getline(cin,s1)){...} Re: A tip for C++ users who got WA!Mind the spaces! You can also use cin >> noskipws; After this spaces won't be ignored. Edited by author 22.11.2010 09:46 |
|
|