Блог пользователя takmicenjesutra

Автор takmicenjesutra, 9 лет назад, По-английски

Take a look at the following code:

#include <cstdio>
#include <set>

using namespace std;

set<int> s;

int main()
{
    printf("%d", s.size() > -1);
    return 0;
}

Output is 0, but it should be 1 (obviously s.size() = 0 > -1). Code is tested on ideone and codeforces compilers. Can somebody explain this?

Полный текст и комментарии »

  • Проголосовать: нравится
  • -12
  • Проголосовать: не нравится