I have two vectors old and newone
I want to copy the value of newone into old what would be the fastest method to do so
I think i can use pointers but i also think assigment
newone = old
will do the same
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main()
{
    vector<int> old = {1,2,3};
    vector<int> newone = {4,5,6};
    
    newone = old;
    for( auto x : newone ){
        cout<<x<<endl;
    }
}
Are there any methods to do itin 0(1)/constant time ?? besides pointers
 
     
    