cpp11/auto.cc
2012-05-05 14:54:38 -06:00

29 lines
451 B
C++

#include <vector>
#include <string>
#include <iostream>
using namespace std;
const vector<string> mcquays = {
"stephen",
"michael",
"bryan",
"derek",
};
int func() {
return 42;
}
int main() {
auto i = 5;
auto j = func();
auto s = string{"hello world"};
cout << i << " " << j << " " << s << endl;
for(auto it = mcquays.begin();
it != mcquays.end(); it++) {
cout << *it << endl;
}
}