Skip to content

C++ version question, about " for(char c : str) ". #7152

Answered by sean-mcmanus
iitsmel asked this question in Q&A
Discussion options

You must be logged in to vote

This is supposed to work (and works for me), but you need to make sure your cppStandard is set to c++11 or newer. Run C/C++: Log Diagnostics to see what is being used. Also, the "4.2.1" appears to reference a g++ header for an old compiler that doesn't support C++11.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@iitsmel
Comment options

Answer selected by iitsmel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants