Qualified's blog

By Qualified, history, 4 years ago, In English

I see people using "ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);" I personally use "ios::sync_with_stdio(0); cin.tie(0);" without the "cout.tie(0);". What is the difference? Is the first option faster than the second?

  • Vote: I like it
  • +12
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it +10 Vote: I do not like it

cout is not tied to anything by default. So, cout.tie(false) is useless.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Then why do people still use it?

    • »
      »
      »
      4 years ago, # ^ |
      Rev. 2   Vote: I like it +23 Vote: I do not like it

      Because they saw it from another person who also doesn't know that it's useless, and they keep using it without noticing because it does nothing — not even any trouble.

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Oh, I get it, they are just using it because other mindless blokes are using it too.