I\'m trying to optimize my C++ code. I\'ve searched the internet on using dynamically allocated C++ arrays vs using std::vector and have generally seen a recommendation in f
I agree with rmeador,
for (int i = 0; vecIt != vecEnd; i++) { *(vecIt++) = i; // <-- quick offset calculation } end = clock(); cout<<"vector: "<<(double)(end-start)/CLOCKS_PER_SEC<