Re: Allocationg memory: contigously ?
GameboyHippo <jasonwthompson@gmail.com> wrote:
> Okay, now for something that really matters. Will the data be
> contigously? Maybe. Maybe not. How to make them contigous: Here's
> what I would do.
>
> int* pint=new[3000];
> int* pint1 = pint;
> int* pint2 = pint + 1000;
> int* pint3 = pint + 2000;
That would work, I'd make pint a vector<int> though instead.
|