如何将带有自动的语句转换为使用类型的语句
how to convert a statement with auto into one which uses types
我更喜欢使用类型,但是我正在努力使类型正确,并在代码中的以下自动语句的一行中。
特别是my_struct.get_map::const_iterator.begin((这一行似乎是一个问题。
auto selected_node = std::next(my_struct.get_map.begin(), selected_item_index); // working
std::pair<std::string, std::string> selected_node = std::next(my_struct.get_map::const_iterator.begin(), selected_item_index); // not working
你知道如何声明映射的迭代器吗?用迭代器替换自动。例如,如果您的map(get_map返回(是map<字符串,字符串>则自动替换为map< string,string >::iterator it
相关文章:
- 转换器练习:跳过 if 语句和 if 语句
- 不能在 if 语句 - c++ 中使用 void func 直接将字符串转换为大写
- "()"如何在C++中将语句转换为表达式?
- C++实用程序,用于将长开关语句转换为封装开关案例阶梯的简洁函数调用
- 如何强制 GCC 以线性方式转换易失性内联程序集语句
- switch 语句和对象隐式 int 转换
- 输入到字符串流并在单个语句中转换为字符串.可以没有帮助程序类
- 是否可以将结构与条件语句完全相同的字符串转换为可以读取和操作的语句?
- 如何将带有自动的语句转换为使用类型的语句
- C++转换为 C# 读取文本以生成语句
- 转换案例的重复语句
- 将 C 按位语句转换为 vb.net
- 如何将 If else 语句转换为 switch 语句
- 将printf语句转换为cout
- 将 cout 语句转换为 fwrite 函数
- 如何使用 malloc() 将 C 语句转换为 C++
- 将 C 中的按位语句转换为 Delphi
- 在 C++ 中将 if, else if, else 语句转换为 switch 语句
- 如何使用Arduino将GPS NEMA语句转换为字符串
- 如何将下面的C++语句转换为Java