if I have very simple part of code like:
string myvariable;
getline(cin, myvariable);
cout << myvariable.size();
and if I run that program locally it returns appropriate value (so exactly number of characters including spaces in the given string).
But if I upload that program to the programs evaluation system (sth like programming olympics or spoj.com) I get value of size() 1 too much.
For example if myvariable value is "test", then:
locally:
size() == 4
in evaluation system:
size() == 5
I tried .length() but the result is exactly the same. What is the reason for that? Thank you for your answers!