vector<vector<int> >中间要空格
时间: 2023-10-22 18:29:13 浏览: 144
在定义vector<vector<int>>时,需要在尖括号前后加上空格,如下所示:vector<vector<int> >。 这是因为在C++11之前,编译器会将>>解释为右移运算符,而不是模板的结束符。在C++11之后,可以省略空格并写成vector<vector<int>>,但为了代码的可读性,建议还是加上空格。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [C++中vector<vector<int> >的简单使用](https://blog.csdn.net/VariatioZbw/article/details/116485536)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [C++ Vector用法深入剖析](https://download.csdn.net/download/weixin_38520046/13989994)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文