1
A
回答
2
是的。他們都是平等的。理解const的最好方法是將其讀爲應用於留下的令牌(除非它是最左側的令牌 - 在這種情況下,它適用於右側的即時令牌)。
參見https://isocpp.org/wiki/faq/const-correctness#overview-const
相關問題
- 1. std ::向量const指針const對象不能編譯
- 2. 向量中的C++ const迭代器
- 3. 多維的std ::向量(C++)
- 4. 包裝std ::向量,向量,C++ SWIG Python
- 5. std :: const中的常量參數:: remove_if
- 6. C++ const std :: string賦值
- 7. 的std ::向量的目標C方法
- 8. C++的std ::向量::明確()崩潰
- 9. C++ std :: array到shared_ptr的向量
- 10. 在VC++ 2010中傳入const向量
- 11. C++ std :: transform向量對 - >第一個到新的向量
- 12. 爲什麼在C++ 17中的std :: variant允許std :: variant <int,const int>
- 13. std ::向量中止問題
- 14. 的std ::陣VS C-陣列VS STD:向量
- 15. C++ std ::向量性能[需要參考]
- 16. Boost.Python和C++ std ::指針向量
- 17. C++ std向量內容範圍
- 18. C++ char * + std ::向量內存泄漏
- 19. C++:std ::向量和輸入interator
- 20. 從「std :: istringstream」初始化「const std :: string」
- 21. 向量的C++
- 22. C++ const正確性與std :: pair
- 23. Const正確性 - 如何訪問C++中的向量元素?
- 24. std ::向量奇怪
- 25. 在std :: string :: assign(std :: string const&)中的分段錯誤
- 26. 如何在std :: string中存儲const char *?
- 27. 如何在std :: string中存儲const char * []?
- 28. 的std ::移動或std ::向前C++
- 29. C++中的向量散列圖
- 30. C + +在STL結構向量中的替換向量
是的。他們都是平等的。理解'const'的最好方法是將其讀爲應用於留下的令牌(除非它是最左側的令牌 - 在這種情況下,它適用於右側的即時令牌)。 – nakiya
https://isocpp.org/wiki/faq/const-correctness#overview-const – nakiya
@nakiya:請在答案部分填寫答案。 – Bathsheba