Afficher un message
Vieux 18/10/2007, 17h29   #6
Daniel T.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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.
  Réponse avec citation
 
Page generated in 0,05627 seconds with 9 queries