→ hylkevin: namespace? 09/06 18:08
推 LPH66: 1. namespace 問題, 所有標準的東西都在 std:: 下面 09/06 18:12
→ LPH66: 然後提醒一下這裡絕對不要 using namespace 09/06 18:13
→ LPH66: 2. 是, 不過通常會儘量減少在 header 裡引用的標頭檔 09/06 18:14
→ LPH66: 3. 你不打那一行編譯器就不知道你在做 template 宣告/定義 09/06 18:14
推 stucode: 新手的話建議還是從一般函數練起 template實作要拆開放 09/06 18:28
→ stucode: 有時候還需要編譯器支援或者顯式具現化 這些問題可能會 09/06 18:29
→ stucode: 模糊你學習的焦點 09/06 18:29
推 damody: 先換ide 09/06 18:29
推 rbufghj9713: 偷偷跟你說,string在std下 09/06 20:19
→ nsa1099: 謝謝大大們的建議,可以run了,真的非常感謝 09/07 13:02
推 Mistyshadowe: 想請問一下不要使用 using namespace 的原因 09/07 19:36
→ Mistyshadowe: 是避免混淆嗎? 09/07 19:37
→ grayStone: 污染 09/07 20:26
→ Killercat: .h裡面 using namespace xxx; 會污染所有include他的 09/07 22:20
→ Killercat: 檔案 包含被.h include的在內 09/07 22:20
→ Killercat: 然而.cpp裡面使用就比較沒有問題 因為絕大多數腦袋正常 09/07 22:20
→ Killercat: 的工程師都會盡可能避免include .cpp 09/07 22:21
→ Killercat: 當然我也看過天兵寫在precompile header(如stdafx.h)的 09/07 22:21
推 stucode: 導入整個名稱空間很少有合理使用的場合 09/07 23:43
→ stucode: 除了放在標頭檔會污染其他檔案外 09/07 23:43
→ stucode: 在原始碼檔案裡面用也可能會產生問題 09/07 23:43
→ stucode: 更可怕的是有時候這樣做會讓名稱間偷天換日 09/07 23:43
→ stucode: 造成難解的執行時期 bug 09/07 23:43
推 dces4212: ide可以換VS community版 免費的 09/08 03:49