for each support ? #7425
Answered
by
Colengms
entropy (Another7)
asked this question in
Q&A
for each support ?
#7425
int main()
{
map<string, int> mymap;
mymap["surrender"] = 1;
for (auto [key, value] : mymap)
{
cout << key << "---" << value << endl;
}
return 0;
}Can compile successfully but prompt undefined identifier |
Answered by
Colengms
Apr 26, 2021
Replies: 1 comment 1 reply
|
Hi entropy (@Another7) . I do not get errors with the following code: #include <iostream>
#include <string>
#include <map>
using namespace std;
int main()
{
map<string, int> mymap;
mymap["surrender"] = 1;
for (auto [key, value] : mymap)
{
cout << key << "---" << value << endl;
}
return 0;
}I suspect you will need to provide a |
1 reply
Answer selected by
Another7
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Hi entropy (@Another7) . I do not get errors with the following code:
I suspect you will need to provide a
cppStandardsetting ofc++17orc++20, for this code to be considered valid. If you have not setcppStandard, it would be the default used by the specified or detected compiler, which likely is notc++17orc++20.