請問namespace前的雙冒號

作者: butterflyred (butterflyred)   2020-05-22 15:48:22
1. ::std::out
2. std::out
如上請問兩者差在哪?
不太確定namespace前的雙冒號代表什麼意思?
麻煩大家了
謝謝
作者: Lipraxde (Lipraxde)   2020-05-22 15:56:00
:: = scope resolution operator
作者: qscgy4 (有點厲害)   2020-05-22 15:59:00
分類勒????google 一下不就有答案了嗎?
作者: steve1012 (steve)   2020-05-22 16:16:00
fully qualificationfully qualify. 比如說你的nespace A 裡面有B. B 會被當成是A::B要是你想要外面的B 你就需要寫 ::B
作者: newking761 (J三小)   2020-05-22 21:22:00
google很難?
作者: eye5002003 (下一夜)   2020-05-23 13:30:00
global namespace scope,就是個完全沒有省略的全名
作者: joe820730 (Let it go)   2020-05-23 14:17:00
https://tinyurl.com/y8t5b9yystackoverflow的問答,參考看看

Links booklink

Contact Us: admin [ a t ] ucptt.com