cout的输出呢???

P1486 [NOI2004] 郁闷的出纳员

@[evening_maple](/user/655351) 不是cout有bug,而是cout好像不能用tie,否则某些编译器的文件指针会乱掉(崩溃)
by c_cpp_a @ 2022-08-09 06:57:33


@[evening_maple](/user/655351) 不过快读快写和单字节操作没这个问题
by c_cpp_a @ 2022-08-09 06:58:45


@[evening_maple](/user/655351) 好家伙,cout关同步流还敢用快读快写,肯定会出问题。
by _cyle_King @ 2022-08-09 07:53:28


```sync_with_stdio(false)``` 之后不能混用 `cin` 和 `getchar`。和 `cout` 或者 `tie` 无关。
by ud2_ @ 2022-08-09 07:59:02


@[c_cpp_a](/user/346332) 云OIer能不能不要乱讲啊
by Etinorally @ 2022-08-09 08:05:36


`cout`不能`tie(0)`??? 什么狗屎暴论
by Etinorally @ 2022-08-09 08:05:58


问题是关同步流之后不能混用C风格读写
by Etinorally @ 2022-08-09 08:07:45


```ios::sync_with_stdio(0);``` 会导致 ```cin``` ```cout``` 之类的 ```iostream``` 的输入输出流与 ```getchar()``` ```scanf``` ```printf``` 之类的 ```cstdio``` 的输入输出流不同步。也就是说开了 ```ios::sync_with_stdio(0);``` 就不能混用两种输入输出方式了。 网上查到的文档给出了这样的说明(机翻): 在stdio同步关闭的情况下,iostream标准流对象可以独立于标准C流运行(尽管不需要),混合操作可能会导致意外的交织字符。
by Kedit2007 @ 2022-08-09 08:40:02


@[bye_wjx](/user/575994) `cout` 加 `tie` 没用,不是不能加
by m256i @ 2022-08-09 09:03:53


@[_该名称已占用_](/user/370281) 那位老师说不能加![](//啧.tk/lh)
by Etinorally @ 2022-08-09 09:04:17


| 下一页