vector<P*>::iterator vectorBeginIter = vpp.begin();
//clang 3.8.0
#include <iostream>
#include <vector>
using namespace std;
class P {
public:
P(int p):i(p) {
}
int getElem() {return i;}
private:
int i;
};
int main()
{
cout << "Hello, world!\n";
int a =10, b = 20, c = 30;
vector<int> vi;
vi.push_back(a);
vi.push_back(b);
vi.push_back(c);
for(auto elem: vi)
cout << elem << endl;
cout << endl;
vector<int*> vip;
vip.push_back(&a);
vip.push_back(&b);
vip.push_back(&c);
for(auto ip: vip)
clang++
Hello, world! 10 20 30 10 20 30 100 200 300 1000 2000 3000 1000 2000 3000