#include <QtCore/QCoreApplication>#include <QVector>#include <QDebug>int main(int argc, char *argv[]){ QCoreApplication a(argc, argv); QVector<int> vector; qDebug() << "Begin in scope\n"; for (int i = 0; i < 10; i++) { vector.push_back(i); qDebug() << &(vector[i]); } qDebug() << "\nEnd in scope\n"; for (int i = 0; i < 10; i++) { qDebug() << &(vector[i]); } return a.exec();}
C++ (Qt)qDebug() << &vector[ 0 ] << &(vector[i]);