Created
November 10, 2011 02:29
-
-
Save dazfuller/1353921 to your computer and use it in GitHub Desktop.
Ignoring the Voices: C++11 Example - Range-For Statement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
int main() | |
{ | |
vector<string> a = { "Ignoring", "The", "Voices" }; | |
for (const auto s : a) | |
{ | |
cout << s << endl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiled as follows with GCC 4.6.1 on Ubuntu 11.10
g++ -std=c++0x -Wall -Werror -o range_for_loop range_for_loop.cpp