close

cin.tie(0)

解除 cin 與 cout 的綁定,亦即ostream不會在istream要輸入時被flush

使用時機:當進行檔案輸出入時不需要用到這功能,解掉吧!

ios_base::sync_with_stdio(false)

解除 cin/cout 與 scanf/printf 的綁定,解除後就不要混用兩種了

 

更詳細的說明請參閱 https://chino.taipei/note-2016-0311C-的輸出入cin-cout和scanf-printf誰比較快?/

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Ernest 的頭像
    Ernest

    夢想,延續生命的意義

    Ernest 發表在 痞客邦 留言(0) 人氣()